[comparison] What is the best way to compare 2 folder trees on windows?

I'm moving a repository from sourcesafe to subversion and I need to ensure that vital points are equal. Is it any existing command / tool for windows that allows me to compare two folder trees that they are equal (has equal folder structure and files of same content)? The ideal will be something command-line like:

some_cool_compare c:\current_vss c:\current_svn -exclude .svn;*.vspscc;*.scc

Is it some tool / command exist or I need to write a script of my own?

This question is related to comparison

The answer is


Did you try: https://www.araxis.com/merge/index.en It allows to visualize changes and selectively merge specific differences in files and folders.


Beyond compare allows you to do that and much more.

It's one of those tools I can't live without.
Take a look here for a reference on the scripting options


SyncToy is a free application from Microsoft with a "Preview" mode for comparing two paths. For example:

SyncToy Preview screenshot (source: https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2010/06/synctoy-preview.png)

You can then choose one of three modes ("Synchronize", "Echo" and "Contribute") to resolve the differences.

Lastly, it comes with SyncToyCmd for creating and synchronizing folder pairs from the CLI or a Scheduled Task.


You can use git for exactly this purpose. Basically, you create a git repository in folder A (the repo is in A/.git), then copy A/.git to B/.git, then change to B folder and compare simply by running git diff. And the --exclude functionality can be achieved with .gitignore.

So, sticking to your example (but using bash shell on Linux):

# Create a Git repo in current_vss
pushd current_vss
printf ".svn\n*.vspscc\n*.scc" >> .gitignore
git init && git add . && git commit -m 'initial'
popd

# Copy the repo to current_svn and compare
cp -r current_vss/.git* current_svn/
pushd current_svn
git diff

As I am reluctant to install new programs into my machine, this PowerShell script (from Hey, Scripting Guy! Blog) helped me solve my problem. I only modified the path to suit my case:

$fso = Get-ChildItem -Recurse -path F:\songs
$fsoBU = Get-ChildItem -Recurse -path D:\songs
Compare-Object -ReferenceObject $fso -DifferenceObject $fsoBU

Like the OP, I was looking for a Windows folder diff tool, in particular one that could handle very large trees (100s of Gigabytes of data). Thanks Lieven Keersmaekers for the pointer to BeyondCompare, which I found to be VERY fast (roughly 10-100 times faster) than my previous old school tool windiff.

BTW, BeyondCompare does have a command line mode in addition to the GUI.


You could also execute tree > tree.txt in both folders and then diff both tree.txt files with any file based diff tool (git diff).