Friday, November 7, 2014

How to Mirror or Sync entire directory and subdirectories with all files included using robocopy in windows

Windows comes with a nice command line tool called robocopy. Use the below command to sync up two folders.

robocopy dirA DirB\ /MIR /W:5

where DirA is the source folder and DirB is the destination folder. If DirB do not exist, it will create one for you. If it already exist, it will check every item in Destination folder DirB and its sub-folders and make sure it mirrors the source directory DirA and its sub-folders. It deletes extra files or copies over new or updated files to complete this task.


No comments:

Turn on Windows 11 Fast Boot

If windows starting is slow, to enable windows 11 fast startup/boot,  Press Windows + R, type powercfg.cpl, and hit Enter.  This will direct...