Comparing folder structure in two environments
Asked Answered
P

6

15

Are there any good tools for comparing two folder structures (files included) between two environments?

i.e. comparing a dev computer with production

Edit:

A note on some lessons learned: dir /s /o:N >> output.txt works well in conjunction with a text comparison tool (I used WinMerge), but the filesystem does appear to matter. NTFS against FAT32 doesn't work well, as one scans the folders in reverse alphabetical order, and the other doesn't. To solve this issue, I copied the files from the FAT32 to an NTFS drive.

Also, DiffMerge is nice, but slow. It actually hung when run on the server (that's where I had access to both sets of files) to a point that I had to force a quit.

I'm sure others have thoughts on doing this with *NIX. Probably a similar technique like ls -alR > output

It's still pretty manual, but it works well.

Just keep in mind that the times on the folders will more than likely be different, so you may want to use a regex to replace them and make them more consistent, since that's fairly benign (I used [\d]{2}/[\d]{2}/[\d]{4}[\s]*[\d]{2}\:[\d]{2}\sAM[\s]*\<DIR\> and [\d]{2}/[\d]{2}/[\d]{4}[\s]*[\d]{2}\:[\d]{2}\sPM[\s]*\<DIR\>).

Prove answered 16/6, 2009 at 21:26 Comment(3)
is this windows or linux or a mix?Padraic
preferably windows, but OS agnostic wouldn't hurtProve
You may want to try synctoy or freefilesync if you just want to compare files/foldersMadlynmadman
P
11

For a tool that runs on Windows (but can work against Linux samba shares), try BeyondCompare.

Pettus answered 16/6, 2009 at 21:30 Comment(3)
Very ironic, yet not unexpected. I just got through doing a folder diff with BC. I have it saved as a session, to compare one folder of log files with another (a previous known good run).Nd
I've been using BC for a long time now, and it works beautifully.Prove
Holy s**t! This software is AMAZING! Thank You, sir! :)Horsey
M
13

I use Diff merge (http://www.sourcegear.com/diffmerge/ - it has a free version) for comparing folder structures on Windows

Mesenchyme answered 16/6, 2009 at 21:30 Comment(1)
Diffmerge did what I needed, was very intuitive, free to download, available as installer or zip. So good.Stein
P
11

For a tool that runs on Windows (but can work against Linux samba shares), try BeyondCompare.

Pettus answered 16/6, 2009 at 21:30 Comment(3)
Very ironic, yet not unexpected. I just got through doing a folder diff with BC. I have it saved as a session, to compare one folder of log files with another (a previous known good run).Nd
I've been using BC for a long time now, and it works beautifully.Prove
Holy s**t! This software is AMAZING! Thank You, sir! :)Horsey
P
4

One windows. Use your favorite diff tool on the files generated from this cmd.

Run this from the folders you wish to compare.
c:\somefolder>dir /s > searchResult.txt

Principle answered 16/6, 2009 at 21:54 Comment(1)
This is actually what i did first, though there seemed to be something different with the way dir was executing, as it was coming out in different orders on the two different systems (I tried the /O:N switch, but to no avail).Prove
S
2

WinMerge also does folder and file comparison and its FREEE

Supranatural answered 4/12, 2013 at 20:41 Comment(1)
Ah - I didn't know WinMerge could compared folder structures too ! .. I have just used tool for compare of file1 vs file2 in past .. It is quite good at full folder structure compare ! Has copy left and copy right to help sync process too ...Bunkhouse
D
0

Option 1)

Mount one of the machines on the other, then use some standard directory compare utility.

Option 2)

Use rsync --dry-run and use the output in some way.

Option 3)

Generate hashes (e.g. sha256) of the files on each side, then compare the lists.

Dunker answered 16/6, 2009 at 21:49 Comment(0)
L
0

WinDiff and KDiff both seem good at doing this without the need for command line dir listing. My personal preference is KDiff.

  • WinDiff shows an expanded list of all files/folders. (I was only interested in differences so turned off "Show Identical Files" in the Options menu).
  • KDiff presents an expandable tree view with nice colour coding.
Lovash answered 22/1, 2013 at 9:7 Comment(1)
WinDiff didn't seem to show folder differences (e.g. an empty folder) ... just files ...Thus I looked further ...Bunkhouse

© 2022 - 2024 — McMap. All rights reserved.