Sync folder over network

Soldato
Joined
2 Jun 2007
Posts
6,839
Location
Mornington Crescent
So, I'm looking for a way to sync two folders over my LAN network. I use my laptop during the week, and PC at the weekend, so every friday I copy from my laptop to PC, overwriting the old files there, and do the reverse on mondays. Its not a huge hassle, but if there is a way to do it automatically (And bonus points for not transfering files which are unchanged between the two folders), that would be better. I've had a look at dropbox's website, but on the FAQ page it implies that it uploads everything to its own servers before copying them? That's not much use to me given the size of some of these files, it would be far quicker just to do it as I normally do, copying over the lan.

But are there any programs that would do this purely over the lan, no internet access required?
 
SyncToy would probably be easiest.

I usually use Robocopy from the command line

Code:
robocopy C:\source\folder D:\destination\folder /mir
That will copy everything, inc subfolders in C:\source\folder to D:\destination\folder. Only files that are new or changed will be copied over. /mir tells it to also delete anything from destination that you deleted in source.

If you replace /mir with /s it will copy everything, inc subfolders, from source to destination as above, but it wont remove deleted files from the destination.

You can put the above in a text file, rename that file sync.bat or whatever, and a double-click is all you need to run it. The paths you can change to suit your needs, it also supports UNC paths for network shares. [\\mycomputer\share for example].

If you intend to sync both ways, just create a second batch file with the source/dest the other way around.
 
Last edited:
Robocopy is what I use for this

It will copy the new / updated files only (after the first run)
 
Thanks for the replies. I've tried synctoy, and its great, apart from the fact I have to run the sync manually. Still, its better than copying everything, since I'm at least only copying the changed files now.

Even so, would any of these programs be able to sync 'on the fly' as in, see its changed and automatically sync them?
 
Thanks for the replies. I've tried synctoy, and its great, apart from the fact I have to run the sync manually. Still, its better than copying everything, since I'm at least only copying the changed files now.

Even so, would any of these programs be able to sync 'on the fly' as in, see its changed and automatically sync them?


you can automate synctoy using scheduled tasks
 
I've got a task scheduled for 4pm every friday, and 9am every monday, I can't get it to do something on a file change, can I?
 
I think that is beyond the capability of both SyncToy and Robocopy. I don't think even the Task Schedular has such an option.

You could just set it to sync every 10 minutes or something.
 
I think that is beyond the capability of both SyncToy and Robocopy. I don't think even the Task Schedular has such an option.

You could just set it to sync every 10 minutes or something.

Ah well, thanks for the replies. As it stands, its easier than it was originally at any rate.
 
Not sure why you quoted me, but the OP asked if he could sync on a file change, and I told him he couldn't! :p

i was mearly saying that you can get synctoy to run every day and it will find the files that have changed and only sync them
 
I've got a task scheduled for 4pm every friday, and 9am every monday, I can't get it to do something on a file change, can I?

i was mearly saying that you can get synctoy to run every day and it will find the files that have changed and only sync them

He was asking if he could get it to sync when a file changed. We have already established way up there that SyncToy and Robocopy would only copy files that have changed. :)
 
could you use something like Dropbox? (assuming the network share is on a PC and not just NAS or something) I think that will sync if any file has been changed.

set up a folder for dropbox to look at on your PC and do the same on the PC with the network share, anything that changes in one folder should be automatically synced to the other folder on the network share and vice versa.
 
could you use something like Dropbox? (assuming the network share is on a PC and not just NAS or something) I think that will sync if any file has been changed.

set up a folder for dropbox to look at on your PC and do the same on the PC with the network share, anything that changes in one folder should be automatically synced to the other folder on the network share and vice versa.



dropbox would be perfect, as long as you dont have the same file open at the same time on two different pc's

Might want to go back and read the OP.
 
lol fail, ah well.

I can add a vote for Robocopy at least, works brilliantly. I have my script set to run at log-off so everytime i log orr, shutdown or restart it'll run
 
Yeah, the frustrating thing is that dropbox does exactly what I want... but it has to upload all the files to the net, and my files are too large! Well, they're tens of Mb, but I'm on cable with an awful upstream, it would take a few hours to do each time I changed the file.
 
Back
Top Bottom