Forrest logo
tool overview
On this page you find all important commands for the CLI tool robocopy. If the command you are looking for is missing please ask our AI.

robocopy

Robocopy is a command line tool available in Windows operating systems for copying files and directories from one location to another. It stands for "Robust File Copy" and was first introduced as part of the Windows Resource Kit in the late 1990s.

Robocopy provides advanced options and capabilities compared to the standard copy command. It can perform efficient file copying, syncing, and mirroring operations. It supports multi-threaded copying, allowing for faster execution by utilizing multiple simultaneous threads.

The tool offers several useful features such as the ability to preserve file attributes, timestamps, and security permissions during the copy process. It can also handle long file paths and filenames greater than the 260 character limit imposed by Windows Explorer.

Robocopy provides various switches to control the behavior of the copy operation, including options to exclude specific files, directories, or file types. It can resume interrupted or incomplete copy tasks, saving time and effort in case of failures.

Additionally, Robocopy supports logging and can produce detailed reports of the copy operation, including information about the files copied, skipped, and errors encountered. It can be scheduled to run at specified intervals using the Windows Task Scheduler, making it useful for automated backup or synchronization tasks.

Overall, Robocopy is a powerful and versatile command line tool for efficiently copying files and directories in Windows, providing extensive control and flexibility over the copy process.

List of commands for robocopy:

  • robocopy:tldr:20fc3 robocopy: Display detailed usage information.
    $ robocopy /?
    try on your machine
    explain this command
  • robocopy:tldr:267c3 robocopy: Copy all files and subdirectories, excluding source files that are older than destination files.
    $ robocopy ${path\to\source_directory} ${path\to\destination_directory} /E /XO
    try on your machine
    explain this command
  • robocopy:tldr:509fa robocopy: Copy all files and subdirectories, including empty ones.
    $ robocopy ${path\to\source_directory} ${path\to\destination_directory} /E
    try on your machine
    explain this command
  • robocopy:tldr:55772 robocopy: Mirror/Sync a directory, deleting anything not in source and include all attributes and permissions.
    $ robocopy ${path\to\source_directory} ${path\to\destination_directory} /MIR /COPYALL
    try on your machine
    explain this command
  • robocopy:tldr:7c99c robocopy: Allow resuming if network connection is lost and limit retries to 5 and wait time to 15 sec.
    $ robocopy ${path\to\source_directory} ${path\to\destination_directory} /Z /R:5 /W:15
    try on your machine
    explain this command
  • robocopy:tldr:8576f robocopy: List all files 50 MB or larger instead of copying them.
    $ robocopy ${path\to\source_directory} ${path\to\destination_directory} /MIN:${52428800} /L
    try on your machine
    explain this command
  • robocopy:tldr:9bf60 robocopy: Copy all `.jpg` and `.bmp` files from one directory to another.
    $ robocopy ${path\to\source_directory} ${path\to\destination_directory} ${*-jpg} ${*-bmp}
    try on your machine
    explain this command
tool overview