Basic synchronization between two folders

robocopy "C:\Source\Folder" "C:\Destination\Folder" /E /MIR /NP /R:2 /W:5

Explanation:

  • robocopy: This is the command-line utility for robust file copying in Windows.
  • "C:\Source\Folder": Replace with the actual path to the source folder.
  • "C:\Destination\Folder": Replace with the actual path to the destination folder.
  • /E: Copies subdirectories, including empty ones.
  • /MIR: Mirrors the directory structure, including deleting files in the destination that don't exist in the source.
  • /NP: Suppresses prompts for confirmation.
  • /R:2: Specifies the number of retries on failed copies (2 in this case).
  • /W:5: Specifies the wait time between retries in seconds (5 seconds in this case).

How to use:

  1. Open Command Prompt: Search for "cmd" in the Start menu and run as administrator.
  2. Paste the command: Paste the command into the Command Prompt, replacing the placeholders with the actual folder paths.
  3. Press Enter: The synchronization process will begin.

Note:

  • This command will overwrite existing files in the destination folder without prompting for confirmation.
  • You can adjust the retry count (/R) and wait time (/W) according to your needs.
  • For more advanced options and customization, refer to the official robocopy documentation.

This command provides a basic synchronization between two folders. For more complex scenarios, you might consider using scripting or dedicated synchronization tools.