PDA

View Full Version : Folder Sync


hel10z
20-Oct-2009, 05:16 PM
Hello,

I have Beyond Compare 3 downloading files from our FTP to C:\XAMPP\ONLINE\%DATE%

The issue I have is that once a month I copy all files and folders from C:\XAMPP\ONLINE to our Archive Drive, which now has tones of folders in date format.

I want to basically automate this so that it Syncs the files from C:\XAMPP\ONLINE to our archive drive \\server\archive.

The issue is that when I try to do an automated script it mirrors what's on C:\XAMPP\ONLINE to the \\Server\Archive and deletes all past files that i had copied

All I want is to add the difference from C:\XAMPP\ONLINE to \\Server\Archive.

E.g.
C:\XAMPP\ONLINE has the folders:

2009-10-20
2009-10-21

\\Server\Archive has the folders:

2009-10-18
2009-10-19

When i run my sync, it deletes:

2009-10-18
2009-10-19

and adds:

2009-10-20
2009-10-21

But what I want it to do is have all 4 folders:

2009-10-18
2009-10-19
2009-10-20
2009-10-21

I can do this via the GUI but not with the scripts and i need it to work in the scripts so I can automate this.

What I have now is:

load "C:\XAMPP\ONLINE" "\\Server\Archive"
sync create-empty mirror:lt->rt

I am losing hair over this!!! :)

Michael Bulgrien
20-Oct-2009, 11:40 PM
"mirror" makes the target folder identical to the source folder.

Try "update" instead. It updates the target with any newer or orphan files/folders at the source.

If you want both sides to have all four folders, you'll have to update in both directions.

Aaron
21-Oct-2009, 11:32 AM
As Michael has pointed out, the Mirror command will make the other side an identical copy. The Update command will bring over newer and orphan (only exist on source side) files.

sync create-empty update:lt->rt

I strongly recommend using the graphical interface initially. It will provide more feedback and has a Preview window before you commit the sync. This way you can try out the different sync types, see if your comparison criteria is set correctly and that folders and files align correctly. Then the Preview window should show what you expect before committing the sync.

hel10z
21-Oct-2009, 10:49 PM
I am such an idi0t.

I had copy instead of update.

I knew it was something easy!!

Thanks again :)