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 File Copy File or Folder
📄 File

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#

RunMacro Copy File or Folder command configuration dialog showing parameter fields
Configuration dialog and parameter fields for the Copy File or Folder command in RunMacro.

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#

  1. Add a File › Copy File or Folder command.
  2. Enter the source path and destination path.
  3. Choose a conflict policy: error, skip, overwrite, or unique name.
  4. (Optional) Enable preserve metadata for files. Save.

Every option explained#

Source path#

The file or folder to copy.

Destination path#

Where to copy to. If the destination is a folder, the item is placed inside using its original name.

Conflict policy#

error, skip, overwrite, or unique_name (auto-append a number to avoid clashing).

Preserve metadata#

For files: keep timestamps and attributes when copying.

Output variable#

Variable that receives the final destination path (default last_copied_path).

Expected result#

A copy appears at the destination; the output variable holds the destination path.

Real example#

Example: back up a config file#

  1. Copy: source config.json, destination backup\config.json, conflict = overwrite.
  2. 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
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.