16

Actually, I have got 2 versions of a folder which has multiple folders and files and has a max depth of 6, now I am not sure what changes I did in which file and in which version.

Use Cases

  1. I need a tool that would list all the files that do not match
  2. Then on clicking on the changed file, it shows the changes, similar to Diff in svn

I can do the second use case manually though a stand-alone comparison tool, but I can't find software which meets the first use case.

10

I suggest you use Total Commander (if for Windows).

First you do a directory compare which let you quickly check which files/folders are missing/newer/different:

enter image description here

With the file copy/move operations you can bring complete files in sync.

Then you do a file contents comparison, and when in edit mode you can copy the different fragments from file to file:

enter image description here

You can use the fully functional shareware version, or $40.- / €32.- will get you a life-long registration.
I live in this program because of its ton of other features.

  • From the Total Commander web page: "Total Commander for Windows is a Shareware (demo version) program. This means that you can test it for a period of 30 days. After testing the program, you must either order the full version, or delete the program from your harddisk." – JerryD Oct 2 '18 at 16:30
  • @JerryD I overlooked that, sorry. I just paid for it. – Jan Doggen Oct 2 '18 at 18:11
6

I recommend KDiff3 which is available for Windows, OS X, and Unix. It's freely available (GPLv2). Its comparison capabilities are excellent! Below is a screenshot from comparing two Linux kernel source code directories:

Screenshot of KDiff3

The file view in the screenshot is displaying both common and different files, but it is trivial to filter and let it only show files that are different/only present in one directory.

5

On Unix, OS X and Windows you can use Meld:

  • free and open-source
  • Two- and three-way comparison of files and directories
  • File comparisons update as you type
  • Auto-merge mode and actions on change blocks help make merges easier
  • Visualisations make it easier to compare your files
  • Supports Git, Bazaar, Mercurial, Subversion, etc.

enter image description here

enter image description here

enter image description here

3

Assuming Windows

WinMerge is a great diff program and can do exactly that. WinMerge is both free and open source.

  • Use Case 1: Just select the two folders in the comparison dialogue and then sort by comparison result (see screenshot for example)
  • Use Case 2: Just double click on any of the files there to see the diff for that specific file - or select two files in th compare dialogue and it'll compare those. screenie
  • Unfortunately, WinMerge does not show whether a folder contains differences or not (recursively). Or at least I have not found any way to make it show that. This problem makes WinMerge a pain to use for a "tree to leafs" comparizon in 6-levels hierarchies. – Nicolas Raoul Jun 19 '14 at 9:12
1

On Linux you can use Krusader:

  • free and open-source
  • list all the files that do not match
  • can compare files by content via external diff programs like Kompare, KDiff3 or xxdiff.

enter image description here

enter image description here

  • looks like "inspired" by Total Commander :) – miroxlav Apr 16 '14 at 18:12
1

I recommend Total commander, it has special subtree comparison tool in menu Commands > Synchronize Dirs...:

enter image description here

I'm using it to compare/sync projects with 100,000 files in tree of 8,000 directories.

Checkboxes:

  • Assymmetric

    • disabled = left and right side are equal
    • enabled = left side is source, right side is target so file deletions on right side can be generated (see rows with red X on demo image)
  • Subdirs - also compare subdirectories

  • By content - also compare files by content (byte-by-byte)

  • Ignore date - compare files only by name and size (an by content, if checked)

Other controls:

  • enter image description here - toggle buttons to show/hide categories of items

  • middle column of main list – sync of each file can be individually customized. Synchronize button starts sync based on selections made in this column.

Notice that in my demo image, in left pane there is a ZIP archive.

In the main list, each line can be evaluated individually:

  • F3 - show left file

  • Shift+F3 - show right file

  • Ctrl+F3 - run line-by-line compare tool (including editor). Its screeshot might be included in another answer.

1

I had a similar problem and ran across this article on How to diff two folders from a Windows command prompt. This uses Microsoft's RoboCopy utility which is included in Windows Vista and up. It works with both local folders and network fileshares.

The command is:

ROBOCOPY “\FileShare\SourceFolder” “\FileShare\ComparisonFolder” /e /l /ns /njs /njh /fp /log:reconcile.txt

The article actually suggests that you also use the /ndl switch to keep the size of the logfile down HOWEVER it warns that when the /ndl switch is active...

  • Folders that exist only on source or destination are not logged unless at least one mismatched file is present or a source file is missing on destination.
  • Folders that exist only on the destination are not logged at all regardless of contents.

Note that all files and folders are compared with or without using /ndl but what is logged is what changes.

Microsoft's webpage explaining the RoboCopy syntax and options is located at: https://technet.microsoft.com/en-us/library/cc733145.aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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