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.

Docs Code Delete Files in Folder
🗑 Code

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#

RunMacro Delete Files in Folder command configuration dialog showing parameter fields
Configuration dialog and parameter fields for the Delete Files in Folder command in RunMacro.

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#

  1. Add a Code › Delete Files in Folder command.
  2. Choose the folder path.
  3. Save. On run, all files in the folder are deleted.

Every option explained#

Folder path#

The folder to clean. Only direct files are removed, not subfolders.

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#

  1. Delete Files in Folder C:\Images.
  2. 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
RunMacro robot

Robots do the work. Your time is yours.

Create a robot in minutes, no coding needed. Reliable execution, remote management, transparent costs — and you always stay in control.