Link to home
Start Free TrialLog in
Avatar of bwierzbicki
bwierzbickiFlag for United States of America

asked on

Best way to perform a large copy job with many subdirectories/files and have it overwrite older files with new ones

Well, a data transfer I've been trying to perform on a client pc went astray and now we are trying to clean it up. It is on a Windows XP machine

The problem I ran into while trying to copy his data was >255 path/filename issues so I couldn't' get a copy to complete without leaving files behind because of the >255 thing.
I used a utility called Teracopy to try since it would give me a list of errors during the copy process. I took a couple of stabs but never finished because I like to see copy jobs have the same amount of files/folders in the destination folder as are in the source folder.

Now, I realize I could have mapped  a drive deep in the path to eliminate a lot of characters, but it's too late for that because my client tried to do a move to a new directory and the result was that most files/folders went, some stayed behind, others aren't in either location.

So.....what I have decided to do is take the 4 different collections of files we have of his data (1 from backup, one from a copy I did just a couple of days before his move, and one from his move/source folders) and copy one on top of the other allowing newer files to overwrite older files, thinking this will leave him in the best possible situation considering the circumstances.

What I'd like to find out from you fine people at EE is what is the best way to do this. I'm thinking XCOPY might do the trick but I've never really used it. I could just go with windows explorer but it is soooo slow.

I'm looking for the most sure way though, even if it is slower. The copy job will entail copying about 30GB of data, preserving folder structure, and automatically keeping newer files.

Thanks for your help
Avatar of tailoreddigital
tailoreddigital
Flag of United States of America image

I've used this for synchronizing 2 directories with sub-folders,
http://www.snapfiles.com/get/SyncBack.html

You can set the synched profile to preserve the newest version of a file, between to two locations (and subf-folders).
ASKER CERTIFIED SOLUTION
Avatar of BT15
BT15
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bill Prew
Bill Prew

XCOPY with the /D option will copy only newer files.  You will also want the /S option to include subfolders.

~bp
Avatar of bwierzbicki

ASKER

Thanks for everyone's answer. I marked BT15 as the solution because that is the one I went with.
However, I tested and used the /xo switch. With the /xo switch it excluded files from the copy job if they were older in the source than the destination
I also liked the ability to log and append to logfile with subsequent jobs.