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.
Copy a file or folder automatically in RunMacro
Copy File or Folder copies source to destination with a conflict policy, and saves the resulting path to a variable.
Prerequisites#
- Source exists; read access to source and write access to destination.
Supported modes#
- Desktop Mode — Operates on the local file system.
- Browser Mode
What it does#
The Copy File or Folder command copies from a source path to a destination path. For folders, the whole subtree is copied. You choose how to handle an existing destination and can preserve file metadata.
Screenshots & video#

When to use it#
- Back up a file before processing.
- Duplicate a template to edit.
- Collect files into a destination folder.
When not to use it#
- You want to move (not keep the original) — use Move File or Folder.
Configuration steps#
- Add a File › Copy File or Folder command.
- Enter the source path and destination path.
- Choose a conflict policy: error, skip, overwrite, or unique name.
- (Optional) Enable preserve metadata for files. Save.
Every option explained#
Expected result#
A copy appears at the destination; the output variable holds the destination path.
Real example#
Example: back up a config file#
- Copy: source
config.json, destinationbackup\config.json, conflict = overwrite. - Use
{last_copied_path}to confirm.
Limitations and failure cases#
- Cannot copy a folder into itself.
- Large folders can take time.
Tips & common mistakes#
With overwrite, the old destination is replaced. Use "unique name" to keep both.
Verification details#
commands/filesystem.py
