Docs
RunMacro Documentation
Create your first robot, then go further as needed.
Clear step-by-step guides to create, run, and improve robots for repetitive computer work.
Delete all files in a folder in RunMacro
The Delete Files in Folder command removes all files (leaving subfolders) in a folder you choose.
Prerequisites#
- Add Delete Files in Folder to the macro.
- Prepare the data or target that Delete Files in Folder will use.
Supported modes#
- RunMacro Runner
What it does#
The Delete Files in Folder command removes all files (leaving subfolders) in a folder you choose. Handy to clean temp data (screenshots, downloads) before or after a run.
Screenshots & video#

When to use it#
- Clean a downloads folder before each run.
- Remove temp files after processing.
- Clear a results folder to avoid mixing old data.
When not to use it#
- Do not use it before verifying the path/backups or when deleting one explicit file is safer.
Configuration steps#
- Add a Code › Delete Files in Folder command.
- Choose the folder path.
- Save. On run, all files in the folder are deleted.
Every option explained#
Expected result#
After execution, Delete Files in Folder completes the described action and makes its result available to the next step.
Real example#
Example: clean the images folder before new downloads#
- Delete Files in Folder
C:\Images. - Then use Download Avatar/Images to fetch a fresh set.
Limitations and failure cases#
- Deletion is destructive under current patterns/permissions, has no undo, and locked files can leave partial results.
Tips & common mistakes#
Deletion cannot be undone — double-check the path before running.
Verification details#
commands/code.py
