Compare, Regardless of File Structure

English support forum

Moderators: Stefan2, white, sheep, Hacker

Post Reply
Alonzo Mosley
Junior Member
Junior Member
Posts: 31
Joined: 2018-03-28, 20:13 UTC

Compare, Regardless of File Structure

Post by *Alonzo Mosley » 2019-07-01, 23:38 UTC

I will try my best to explain.

I would like to compare two directories that have totally different subdirectory structures. All I care about is that the files in the left side have duplicates in the right side - I don't care what subdirectories they're in.

So, for example:

c:\Files\Payroll\Ghisler.docx
and
d:\Files\Personnel\Discipline Files\Severance\Ghisler.docx

would be a match.

(Essentially, what I've done is, I've reorganized about 2500 different files, and I just want to make sure that I've reorganized all of them, comparing to the backup. No File Left Behind.)

Thanks!
Dan: You're gonna need to get someone to fix my computer.
Kim: What's wrong with it?
Dan: It's in several pieces on my floor.

lezerogan2
Junior Member
Junior Member
Posts: 37
Joined: 2010-04-19, 15:50 UTC

Re: Compare, Regardless of File Structure

Post by *lezerogan2 » 2019-07-02, 06:30 UTC

Assuming you have not changed the content of the files (you just reorganize them in different folder structure), and that you do not have duplicates file names, MAYBE you can use a very primitive way, just to ensure all files exists in the destination tree.
Stand on top of the source tree and do "search"(alt-f7) while in advanced tab mark "Attributes" and un-mark "Directory".
Then start search. At the end press "feed to listbox".
Then create new directory and copy to it all the files in the listbox.
Then do the same for the destination tree. Now you can compare the 2 new directories.
Very low solution but maybe it will suit you.

User avatar
Hacker
Moderator
Moderator
Posts: 11229
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Compare, Regardless of File Structure

Post by *Hacker » 2019-07-02, 08:53 UTC

Alonzo Mosley,
Ctrl-B, Tab, Ctrl-B, Shift-F2? Not tested.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.

Alonzo Mosley
Junior Member
Junior Member
Posts: 31
Joined: 2018-03-28, 20:13 UTC

Re: Compare, Regardless of File Structure

Post by *Alonzo Mosley » 2019-07-02, 17:06 UTC

Oh, I'm sure there are dupes.

I'm a little leery of copying everything into ANOTHER directory - I'm trying to prune down the number of files, copies, etc. Even temporarily it seems fraught?

Not sure from what screens I do your untested typing, Hacker, but will report back. Thanks
Dan: You're gonna need to get someone to fix my computer.
Kim: What's wrong with it?
Dan: It's in several pieces on my floor.

User avatar
Usher
Senior Member
Senior Member
Posts: 402
Joined: 2011-03-11, 10:11 UTC

Re: Compare, Regardless of File Structure

Post by *Usher » 2019-07-02, 17:23 UTC

2Alonzo Mosley
With Shift+F2 by Hacker's method you will see missing (omitted) files. If you want to find and delete dupes, you should use Alt+F7.
Regards from Poland
Andrzej P. Wozniak

User avatar
Hacker
Moderator
Moderator
Posts: 11229
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Compare, Regardless of File Structure

Post by *Hacker » 2019-07-02, 21:04 UTC

Usher,
I understood the goal is to check if all files in the left structure are also in the right structure somewhere(?) The steps I mentioned should highlight different files. Pressing Num*, Tab, Num* should highlight all files that look the same. Hope that helps somehow.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.

User avatar
Usher
Senior Member
Senior Member
Posts: 402
Joined: 2011-03-11, 10:11 UTC

Re: Compare, Regardless of File Structure

Post by *Usher » 2019-07-02, 22:09 UTC

2Hacker
Please, don't try to explain me what I did many times it the past. It's highly possible that some file may be copied more than once ("there are dupes") and some (missing, omitted) files aren't copied at all.
After using Shift+F2 I know that highlighted different files in this case are files omitted during copying.
But I also know that NONE of duplicated copies will be highlighted. You can prepare test folders, then use Num* on both sides and count files. That's why additional Alt+F7 in the destination folder ("on the left") is needed.
Regards from Poland
Andrzej P. Wozniak

User avatar
Hacker
Moderator
Moderator
Posts: 11229
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Compare, Regardless of File Structure

Post by *Hacker » 2019-07-02, 23:01 UTC

Usher,
don't try to explain me what I did many times it the past
Well, you were talking about deleting duplicates while as I understood the OP he is trying to make sure there actually are duplicates of each file. Not sure where I went wrong with my post. Anyways, I hope the OP finds the solution he's looking for.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.

Alonzo Mosley
Junior Member
Junior Member
Posts: 31
Joined: 2018-03-28, 20:13 UTC

Re: Compare, Regardless of File Structure

Post by *Alonzo Mosley » 2019-07-10, 04:29 UTC

No fighting in front of the kids!

Yeah, I was trying to make sure as I moved a ton of files around that I didn't miss any - so I just wanted a raw alpha list of all files in one drive on the left and of the other drive on the right, so I could make sure.

Thanks
Dan: You're gonna need to get someone to fix my computer.
Kim: What's wrong with it?
Dan: It's in several pieces on my floor.

vdijken
Junior Member
Junior Member
Posts: 67
Joined: 2016-07-30, 14:07 UTC
Location: The Netherlands

Re: Compare, Regardless of File Structure

Post by *vdijken » 2019-07-13, 09:52 UTC

Open a cmd window, go to the top directory and perform the command
for /f "delims=" %a in ('dir/a-d /s /b ') do @echo %~nxa >>dir.log
You get a full list of all files. Do that also for the other directory. Sort the dir.log files with
sort dir.log /o dir1.log
Be aware that dir.log is mentioned in dir1.log
Compare the dir1.log files in TC.

brahman
Member
Member
Posts: 141
Joined: 2006-04-26, 13:27 UTC

Re: Compare, Regardless of File Structure

Post by *brahman » 2019-07-13, 16:42 UTC

So Alonzo

could you please enlighten us which solution you found the best and why?
Regards, Brahman
Win10 Pro x64

Post Reply