OK, so there’s got to be a simple way to do this, but I haven’t yet been able to find it: on my Windows 8 system, I have two folders with similar, but not identical content; specifically, newer versions of some files may be in either of the two folders. I want to merge these folders into one, but I’m not sure what, exactly, is going to happen if I just copy one into the other. I suppose it’ll ask which file to keep, but there could be many collisions, such that sorting through them manually will be impractical.
Is there any tool that accomplishes this, or is it possible natively, using Windows 8?
I believe **xcopy **is a native command in Win8; it has the /d flag:
/d [:date] = Use the xcopy command with /d option and a specific date, in MM-DD-YYY format, to copy files changed on or after that date. You can also use this option without specifying a specific date to copy only those files in source that are newer than the same files that already exist in destination. This is helpful when using the xcopy command to perform regular file backups.
I think Explorer can do this natively. In Win 7, at least, it has “keep the newer item” and “do this for all subsequent conflicts” options. Not 100% sure if Win 8 has the same capability though.
That /d option for XCOPY sounds like it requires you to specify a specific date.
I think either the old DOS programs COPY and/or XCOPY (or both?) had a command-line option that specifically means: Copy all files EXCEPT don’t copy an older file over a newer one. That is exactly what you would need to merge to directories like the OP wants.
PKUNZIP certainly had such an option. I expect all newer derivative of that would too (like WINZIP).
I am not a big-time Winders user, so I don’t know that in great detail. As suggested above, I would look first at Explorer to see if it has such an option. I mean, assuming I wanted to use a GUI method in the first place. My first instinct would be to use a command-line program, like COPY or XCOPY or PKZIP / PKUNZIP.
ETA: The Unix/Linux program cp has exactly such an option too.
I use the program that started out as 4DOS and is now called TakeCommand. Its copy command has a /U switch that stands for update. The Windows command prompt lacks that switch.
ROBOCOPY is more robust (ha!) than XCOPY and might be easier for this purpose. I don’t recall if it’s native to Win7 but it’s certainly on the various server resource kits and can be obtained for free from MS.
Win7 does offer you a choice, but it’s not based on the timestamp - it’s just whether you want to:
Keep the original (i.e. don’t copy)
Overwrite
Keep both (renaming the new one dynamically)
Win8 expands on this by offering a ‘let me choose for each file’ option, which opens up an interactive dialog with timestamps and sizes (and with thumbnails for image files), allowing you to specify exactly what you want for each conflict - so you can pick the newest file for each collision - but this would be quite laborious for large numbers of files.
There isn’t (as far as I can tell) a native, bulk ‘keep the chronologically newest file’ option in the file copy dialog in either Win7 or Win8.