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.
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:
Post a Comment