howto do recursive compare if folder names mismatch

Two- and three-way folder compare and merge issues.

howto do recursive compare if folder names mismatch

Postby koninger » Mon Jun 26, 2006 4:58 pm

How can I compare contents of folders recursively if the names of the sub-folders do not match?

e.g.

foo
|
+--red
| file1
|
+--green
| file2
|
+--blue
file3

vs.

foo_update
|
+--rouge-neuf
| file1
|
+--toms-changes-for-blue
file3

-----------
Software:
UltraCompare Professional Version 4.00a
Single User License
User avatar
koninger
Newbie
 
Posts: 5
Joined: Sun Jun 25, 2006 11:00 pm

Re: howto do recursive compare if folder names mismatch

Postby Mofi » Tue Jun 27, 2006 5:49 am

Is your question a joke?

How should UltraCompare know which subdirectory of foo_update belongs to which directory of foo? I have never seen a computer program which has the gift of second sight or can really read the thoughts of the user (and hopefully there will be never such a program).

Rename the subdirectories of foo_update according to the subdirectory names of foo or compare folder by folder.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3937
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: howto do recursive compare if folder names mismatch

Postby koninger » Tue Jun 27, 2006 7:06 am

No. I asked seriously.
And, of course, I do not expect the tool to guess which sub-directory may match what other one.
A simple any-to-any comparison will do.
And, yes, renaming is what I'm doing at the moment when using IDM's Folder Compare to compare folders. But that's not really feasible for frequent tasks.

Any other recommendations?

Thanks in advance.
User avatar
koninger
Newbie
 
Posts: 5
Joined: Sun Jun 25, 2006 11:00 pm

Re: howto do recursive compare if folder names mismatch

Postby Mofi » Tue Jun 27, 2006 8:25 am

Aha, the files are unique at both locations. I don't know if you have Total Commander, but here is a possible solution for Windows Explorer.

Run a search for *.* on directory foo. The Explorer will find all files. Select all with Ctrl+A, press Ctrl+C, create anywhere a temp directory and paste with Ctrl+V all files into 1 directory.

Redo the procedure above for all files in foo_update with a 2nd temp directory. Then compare the 2 temp directories with all files.

If you need this often, create a batch file which makes the copies and starts UltraCompare in folder compare mode with the 2 temp directories.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3937
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: howto do recursive compare if folder names mismatch

Postby koninger » Tue Jun 27, 2006 4:43 pm

Thanks Mofi,
with the two additional temporary directories and all files copied "flat" in there, I see the differences. So that workaround works, and it's easier than aligning the folder's names.

But, especially for frequent tasks, I'd really expect to do this within Ultra Compare (though I may try your hint for a command line batch script, Mofi).

I'm actually surprised that UltraCompare seems to lack an intrinsic solution for recursive compare with ignoring sub-folder's names...

(in my experience, people in a team tend to re-name folders containing their work -- adding a version indicator or just their own names ;-)
User avatar
koninger
Newbie
 
Posts: 5
Joined: Sun Jun 25, 2006 11:00 pm


Return to Folder Compare and Merge