User Tools

Site Tools


public:using_robocopy

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
public:using_robocopy [2024/03/21 10:59] – created thomaspublic:using_robocopy [2024/03/21 15:51] (current) – [To mirror a folder] thomas
Line 1: Line 1:
 ====== Using robocopy ====== ====== Using robocopy ======
 +
 +Robocopy is a Windows command line tool that can be used to robustly copy files. It's a bit similar to ''rsync'' on UNIX platforms.
  
 ===== To mirror a folder ===== ===== To mirror a folder =====
  
-<code>+<code batch>
 robocopy C:\Folder1\ D:\Folder2\ /MIR /XO robocopy C:\Folder1\ D:\Folder2\ /MIR /XO
 </code> </code>
  
 Meaning of the options: Meaning of the options:
-  * ''/MIR'': Mirrors the source to the destination. This also deletes files and directories from the destination that do not exist in the source! +  * ''/MIR'': Mirrors the source to the destination. \\ :!: This also deletes files and directories from the destination that do not exist in the source! 
-  * /''XO'': Do not recopy older files. If the destination has a file with a date equal or newer to the source, the source file is not copied again.+  * ''/XO'': Do not recopy older files. If the destination has a file with a date equal or newer to the source, the source file is not copied again.
  
 ===== References ===== ===== References =====
Line 15: Line 17:
   * https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy   * https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy
   * https://medium.com/@furkangozukara/how-to-mirror-a-disk-into-another-disk-by-using-robocopy-command-of-windows-f6a5f758d464   * https://medium.com/@furkangozukara/how-to-mirror-a-disk-into-another-disk-by-using-robocopy-command-of-windows-f6a5f758d464
 +
 +{{tag>Windows robocopy}}
public/using_robocopy.1711018765.txt.gz · Last modified: by thomas

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki