Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I believe this question to be very simple however I want to triple check before I screw myself up. My testing has shown this process to work (I think, but I may be missing something) but again I'd like a 2nd set of eyes.

I have c:\1 and c:\2 with subdirectories. In some cases a file or directory will exist in one but not the other, in some cases the same file will exist in both sides in the same location but one is newer than the other, yada yada.

Is it as simple as:

    xcopy c:\1 c:\2

? In which case c:\2 would be the latest. (And of course if I did xcopy c:\2 c:\1 then I'd end up with identical directory structures.)

share|improve this question

2 Answers 2

up vote 2 down vote accepted

I would use a 3rd directory to put all the contents there (and you would not delete/overwirte something by accident)

xcopy /D C:\1 C:\3 
xcopy /D C:\2 C:\3

You will end up with a directory (3) containing all files/folder from directory 1 and 2 (that's the merge part) and all files are the most resent ones.

share|improve this answer
which date does it use? creation? access? modified? –  barlop Jul 14 '11 at 14:24
from the /? option it's the modified-date (Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time.) –  Layticia Jul 14 '11 at 14:31
@Layticia - I like your approach because as you said it leaves the originals untouched. Obvious question but this seems to validate my logic right? –  Howiecamp Jul 14 '11 at 15:01
@Howiecamp: Yes, you are right –  Layticia Jul 15 '11 at 7:08

I would use meld to inspect every change and approve them manually.

share|improve this answer
I'm guessing you want something more automatic though, always the most recent file by modification time, no matter what? –  PriceChild Jul 14 '11 at 14:15
Correct. I think the xcopy approach does it tho. But thanks for the meld link, I like it and am gonna check it out. Can you compare it to WinMerge? –  Howiecamp Jul 14 '11 at 15:03
Upvotes for him then! I've got both winmerge & meld installed on my pc. WinMerge is obviously easier to install on windows but I prefer meld's presentation & interface. Simple things like mousewheel on middle bar to scroll not by line but by change. –  PriceChild Jul 14 '11 at 15:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.