Robocopy example - server relocation


Even in times of Windows PowerShell there are certain commands that still do not have a worthy successor in Windows PowerShell. One of these commands is undoubtedly the good old robocopy command.

With Robocopy it is possible to transfer or synchronize certain folders. Robocopy takes over all permissions if the right parameters are used, which makes Robocopy suitable for use in file server relocation. In addition, the copying process can be logged in a text file and checked afterwards.

The following command transfers all files of a source folder to a destination folder:

c:\windows\system32\robocopy.exe \\sourceserver\d$\Ordner e:\targetserver /e /mir /NP /tee /ZB /COPYALL /r:1 /w:1 /MT:32 /log+:c:\log\sync.txt

The files are transferred to the destination folder completely including permissions. If the data is synchronous after the first run, the command can be started again to transfer only the changes, including the deletions that have taken place in the meantime in the source folder.

As mentioned above, Windows PowerShell is not yet able to compete with Robocopy in terms of performance and the system resources it requires for the simple purpose of synchronizing folders.


positive Bewertung({{pro_count}})
Rate Post:
{{percentage}} % positive
negative Bewertung({{con_count}})

THANK YOU for your review!

Questions / Comments