KeyRoutines
ConditionFreecond.file.exists

Check if a file or folder exists on Windows 11

File or folder exists is a condition that answers one question: is this path there right now, and does it look the way you expect? People use it to skip a step when a file is missing, or to hold a routine until an export or render has finished saving.

How it works

  • You pick a path and say whether it must be a file, a folder, or either.
  • Turn on "has stopped changing" to require that the file stayed untouched for a set time (2 seconds by default) and that no app still has it open for writing.
  • Advanced options add a minimum or maximum size in bytes, and an age based on when it last changed.
  • Inside Wait until it reacts to changes in the file's folder instead of checking over and over, so waiting for a file costs almost nothing.
  • When the check fails, the reason names what was wrong, for example that the file is still open for writing in another app.

Routines that use it

Wait for a finished export

After Open app starts your video editor's export, Wait until the file exists and has stopped changing, then Move or copy file puts it in your upload folder.

Skip a missing backup

Before Zip files runs, check that the project folder exists; if it doesn't, Show banner tells you why the backup was skipped.

Only act on big files

Combine this condition with a minimum size so a routine only moves recordings over a certain size and leaves small test clips alone.

Good to know

  • A OneDrive "online only" file counts as stable and is never opened to check it.

Questions

How do I wait until a file has finished copying on Windows?
Use File or folder exists inside Wait until with "has stopped changing" turned on. It only passes once the file has stayed unchanged for the time you set and no app is still writing to it.
Can it check a folder instead of a file?
Yes. Set the kind to folder, or to either if you don't mind which one it is.

Pairs well with

Build this routine in KeyRoutines

Free from the Microsoft Store for Windows 11 and 10. Pro is a one-time upgrade.