How-To: Synchronise two folders using xcopy.
The main reason you may want to sync folders on a single machine is to backup your data. You would probably be best to find a backup utility to do this.
If you want to sync folders over networked drives, this guide may help you also. There are more detailed articles at Inspect My Gadget on syncing documents between two networked computers. Find them here.
On the very odd occasion you do want to sync folders on a single computer, it is not too hard to achieve. There are number of applications available to help you do this, but many of them cost money. Windows has a solution by a command in the command prompt which will work on all Windows PC’s. Microsoft also offers a program called SyncToy which does the same thing with a nice GUI interface.
This is a two part article. Part 1 will look at using xcopy to sync your folders, and Part 2 will look at using SyncToy.
Part 1 will cover the following topics.
- How to use xcopy
- How to put xcopy into a batch file
- How to schedule the batch file to run a sync at a set time.
The reason I like xcopy is that it is quick to setup, and you do not require any additional software to get it to work. This means it is good for 1 off syncs. SyncToy will be the best solution for most people who require to sync more frequently.