Tuesday, September 11, 2012

ROBOCOPY - Examples

Robocopy is a command line file copy utility which comes with windows tool kit. It become part of operating system from windows vista. Unlike other commands like copy, Xcopy, Robocopy has various advantages, i) it is designed for reliable copy of entire folders of any size (large size) ii) it copies files over network and gives resume copy feature when there is any disruption in network.

Syntax
robocopy source destination [switches]

Example

C:\kalyan>robocopy "\\Softwares\OperatingSystems\WindowsXP" C:\temp" /E /Z /Purge
/log:C:\robocopy.log

Explanation

\\Softwares\OperatingSystems\WindowsXP -- Source folder
C:\Temp -- Destination Folder
/E  -- Copy folders even it is empty
/Z  -- Copy files in restartable mode
/PURGE -- Removes all folders or files in destination folder if those are not exists in source location
/log:filename -- Writes log in the specified location with complete details like what files copied, what files / folders removed, how much time taken, tranfer rate etc.,

No comments: