How to Compare Two Folders in Windows 11 - Windows Basics


Wednesday, January 31, 2024

How to Compare Two Folders in Windows 11

It is always a good idea to back up important files and folders on your computer. Everything goes wrong, and if you don't have a backup, you could lose those files forever. Creating a backup is simple and can give you a lot of peace of mind.

But how can you tell if your backup is up to date? You may not be sure how many changes you've made since you last created a backup. If that's the case, it would be helpful if you could compare folders to see if they are the same or if there are additional files in one of them.

If you want to check if two folders are identical, here's how to compare two folders in Windows 11.

How to Compare Two Folders Using Properties

Windows allows you to open a window containing information about the folder's properties. Although you can't compare directly in the Properties window, you can open the two windows side by side. This allows you to quickly compare some key information about folders, such as the size of the folder and the number of files it contains.

Although this information cannot tell you for sure that the folders are the same, it can be an easy way to determine whether they are different.

Compare folders from Properties

To compare the number of files, subfolders, sizes and creation dates of two folders, you can use the Properties option in the File Explorer context menu. This option allows you to quickly view the main properties of a folder.

To get started, launch File Explorer by pressing Windows + E. Find the first folder you want to compare, right-click on it and select Properties.

Keep the first folder's Properties window open. Then, find the second folder, also right-click on it and select Properties.

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

This helps give you an overview of the differences between folders.

Compare folders using Command Prompt

You can also use the robocopy command in Command Prompt to see the differences between two specific folders. This command is essentially to copy files from one folder to another, but you can “tell” it to show the differences between two specified folders and not copy any files.

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

In the Command Prompt interface, type the following command. Replace Folder1 with the path to the first folder and Folder2 with the path to the second folder you want to compare. Make sure both directory paths are enclosed in quotes.

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

You will see the difference between your folders.

If you are curious about the function of the robocopy command, here is the meaning of each parameter in the command:

  • L: Tells the command not to copy files but to display a log of files in the specified directory.
  • NJH: Exclude splices, hard links, and reanalysis points from consideration. This way, the command will focus on regular files in the specified directories.
  • NJS: Exclude symbolic links from the process.
  • NP: Exclude directory timestamps.
  • NS: Exclude file security information.

It's all that simple! Hope you are succesful.

No comments:

Post a Comment