How to compare two folders in Windows 11 and Windows 10

How to compare two folders in Windows 11 and Windows 10

Do you want to compare the number of files or folders or just visualize the difference between two folders? There are two graphical methods and one command line method for this.

How To Geek offers options on how to perform the folder comparison task on a Windows 11 or Windows 10 PC.

Compare folders using Properties

To compare the number of files, subfolders, size, and creation date of two folders, use the Properties option in Windows File Explorer. This allows you to quickly view the main attributes of a folder.

To get started, launch File Explorer using Windows+E. Find the first folder, right-click it, and select Properties.

Keep the Properties window of the first folder open. Then locate the second folder, right-click it, and select Properties.

You now have the Properties window open for both of your folders. Place these windows next to each other by dragging them and you will see the difference in the contents of these folders. For example, you can see how many files both folders contain, the size of those folders, etc.

This gives you an overview of the differences between your folders.

Compare folders using the command line

If you prefer command-line methods over graphical methods, use the robocopy command at the command line to see the difference between the two folders.

This command is actually for copying files from one folder to another, but you can make it show the differences between the two specified folders and not copy the files.

To use robocopy, first open the Start menu, search for Command Prompt, and launch it.

At the command line, type the following command. Replace Folder1 with the path to your first folder and Folder2 with the path to your second folder. Make sure both folder paths are enclosed in double quotes.

To copy the full path of a folder with double quotes around the path, hold down the Shift key on your keyboard, right-click the folder, and select Copy as Path.

robocopy "Folder1" "Folder2" /L /NJH /NJS /NP /NS

You will see the difference between your folders.

If you’re wondering what the robocopy command does, here’s an explanation of each flag:

  • L : specifies not to copy files, but to show a log of files in the specified folder.
  • NJH : This check box excludes connections, hard links, and reanalysis points from consideration. Thus, the command focuses on normal files in the specified folders.
  • NJS : This check box excludes symbolic links from the process.
  • NP : This check box excludes folder timestamps.
  • NS : This check box turns off file security information.

Compare folders with WinMerge

If you need more information about the differences between your folders, Windows doesn’t have a built-in tool to help you with that. However, you can use the free third-party application WinMerge to compare multiple folders.

To use it, start a web browser on your computer, go to the WinMerge website, download and install the program. Make sure you download the executable file of the program and not the ZIP version.

Open WinMerge, then choose File > Open from the menu bar or press Ctrl+O.

In the “1st file or folder” field, select “Browse” and select the first folder to compare.

In the “2nd file or folder” field, click the “Browse” button and select the second folder to compare.

In both fields, enable the “Read-Only” option. Click the “Folder: filter” field and enter *.* , if it is not there yet. This ensures that the program compares all files in both specified folders. Then click Compare at the bottom.

On the next screen, you will see a comparison of the specified folders. You will see information such as identical files in both folders, missing files in the same folder, etc.

And this is how you will find out what is not in one folder and what is in another. This can be very useful if you’re trying to quickly compare different versions of the same folder, as you would when backing up.

Related posts