Page 1 of 1

Any way to compare directories for common files regardless of location in subdirectories

Posted: Fri Jan 11, 2019 9:06 am
by HGinDC
Hello. This is my first post. I was wondering if there is a way to check two "main" directories, each of which have numerous subdirectories that do not necessarily mirror each other, to find matching and unique files regardless of their location in the subdirectory structure of the main directory. I have a directory (Directory A) that contains may years' worth of documents arranged in numerous, various, and sundry subdirectories that have been modified over the years. I have a second version of this directory (Directory B) that is supposed to have the same files, but not necessarily in the same subdirectory structure because that structure has been modified by other users over the years. I imagine that the same files are in both top directories but not according to any common subdirectory structure. Is there any way to check this using EDP? Thank you.

-Howard

Re: Any way to compare directories for common files regardless of location in subdirectories

Posted: Fri Jan 11, 2019 12:42 pm
by psguru
No, not with ExamDiff Pro. If you find a diff tool that does this, please let us know.

Re: Any way to compare directories for common files regardless of location in subdirectories

Posted: Fri Jan 11, 2019 7:12 pm
by HGinDC
Beyond Compare claims to do this:


"Ignore Folder Structure: Compares filenames regardless of which subfolder they may be in. (Also called Flatten Folders.)"

Re: Any way to compare directories for common files regardless of location in subdirectories

Posted: Sat Jan 12, 2019 3:03 am
by JeremyNicoll
You could I suppose copy every file from your first directory structure to a 'fromone' work folder, and every one from the second to a 'fromtwo' work folder, and then compare those. But if there's files with the same leafname in different places in either structure, how would you name the apparent duplicates in the work folders? Even if you renamed them in some 'automatic' way during copying, you'd still have to keep track of how the new names corresponded to the original locations of the files.

As it stands now, if you do a full recursive compare and display the results sorted by the CRC column, at least you can see immediately which files in your two structures are the same. If you're lucky that will be almost all of them so you'd only need to consider the others by some more manual process.

Re: Any way to compare directories for common files regardless of location in subdirectories

Posted: Tue Jan 15, 2019 4:00 pm
by psguru
HGinDC wrote: Fri Jan 11, 2019 7:12 pm Beyond Compare claims to do this:


"Ignore Folder Structure: Compares filenames regardless of which subfolder they may be in. (Also called Flatten Folders.)"
From what I understand, this would have a problem with identically named files located in different folders. It looks like matching is rather random. Here's how it's explained in their forum post:
The View menu -> Ignore Folder Structure will remove subfolders from view and put all files into a single bucket. This also changes the comparison: files in any subfolder will then align if they have equal names. If you have multiple files with the same name, the alignment occurs before the comparison, so it may not align the pair you expect.