DocsFileCopy File or Folder

Copy a file or folder automatically in RunMacro

Desktop ModeBrowser ModeRunMacro 3.5+

Copy File or Folder copies source to destination with a conflict policy, and saves the resulting path to a variable.

Dialog & quick setup

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.
  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.

Options reference

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).

Modes & when to use

Desktop Mode

Operates on the local file system.

Browser Mode

Best for

  • Back up a file before processing.
  • Duplicate a template to edit.
  • Collect files into a destination folder.

Use an alternative when

  • You want to move (not keep the original) — use Move File or Folder.
Before you run
  • Source exists; read access to source and write access to destination.

Example workflow

Example: back up a config file

  1. Copy: source config.json, destination backup\config.json, conflict = overwrite.
  2. Use {last_copied_path} to confirm.
Expected result: A copy appears at the destination; the output variable holds the destination path.

Tips & limitations

With overwrite, the old destination is replaced. Use "unique name" to keep both.
  • Cannot copy a folder into itself.
  • Large folders can take time.

Applies to RunMacro 3.5+ · Desktop Mode & Browser Mode · Windows 10/11

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.