How to Compare Two Folders in Windows 11
Learn how to compare two folders in Windows 11 using this guide.
It’s always a good idea to keep a backup of your important files and folders on your computer. Things do go wrong, and if you don’t have a backup, you could potentially lose those files forever. Creating a backup is simple to do and can give you a huge amount of peace of mind.
How can you tell if your backup is up-to-date, however? You may not be sure how many changes you’ve made since you last made a backup. If that’s the case, it would be useful to be able to compare folders to see if they’re the same or if there are additional files in one of them.
If you want to check if two folders are exactly the same or now, then here’s how to compare two folders in Windows 11.
How to Compare Two Folders Using Properties
Windows allows you to open a window that contains information about the properties of a folder. Although you can’t do a direct comparison in a Properties window, it is possible to open two of these windows side-by-side. This allows you to quickly compare some key information about the folders, such as the size of the folder and the number of files it contains.
Although this information can’t tell you for certain that the folders are the same, it can be an easy way to determine if they are different.
To compare folders using Properties in Windows 11:
- Open File Explorer.
- Locate the first folder that you want to compare.
- Right-click on the folder and select Properties.
- You’ll see information such as the location, size, and number of files in your selected folder.
- Move this window to one side and navigate to the second folder that you want to compare in File Explorer.
- Right-click on the folder and select Properties.
- Drag the two Properties windows so that they are side-by-side.
- You can now compare the details of both windows. In this case, the size and the number of files in the folder are different, so we can say for certain that these are not duplicates of the same folder.
How to Compare Two Folders Using Command Prompt
Whilst the method above is a simple way to determine if two folders are different, you may want a little more information on exactly what is different about them. If this is the case, then you can use Command Prompt to find differences between the files within your folders.
This is very useful for ensuring that, if you have folders that are near duplicates, you keep the version that is more up to date. This method will only compare the files within the main folder, however; it won’t look at files within subfolders.
To compare two folders using Command Prompt:
- Click the Search icon in the toolbar.
- Type command prompt and select the Command Prompt app in the results.
- Type robocopy followed by a space.
- In File Explorer right-click the first folder you want to compare and select Copy as Path.
- Return to the Command Prompt window and paste the path to your first folder, and then type another space.
- Copy the path to the second folder by using the method from step 4.
- Return to the Command Prompt window and paste the path, then type another space.
- Type /L /NJH /NJS /NP /NS and press Enter.
- You’ll see a list of differences between the two folders.
- A file marked *EXTRA File appears in the second folder, but not the first.
- A file marked New File appears in the first folder, but not the second.
- Files marked Older appear in both folders, but the file in the first folder has a creation date earlier than the same file in the second folder.
- Files marked Newer appear in both folders, but the file in the first folder has a more recent creation date than the same file in the second folder.
How to Compare Folders Using PowerShell
You can also compare your two folders using PowerShell. As with the Command Prompt method, this will provide you with information about the files that appear in one folder but not the other.
However, you won’t see any information which version of files that appear in both folders is older. If that information is important to you, then you should use the method above instead. Unlike the method above, using PowerShell does allow you to compare files within subfolders as well as the main folder.
To compare folders using PowerShell:
- Click the Search icon.
- Type powershell and select the PowerShell app from the results.
- Type $fso = Get-ChildItem -Recurse -path followed by a space.
- In File Explorer right-click on the first folder you want to compare and select Copy as Path.
- Return to PowerShell and paste the file path and then press Enter.
- Type $fsoBU = Get-ChildItem -Recurse -path followed by a space.
- Copy the path to your second folder using the method in step 4.
- Return to PowerShell and paste the folder path, then press Enter.
- Type Compare-Object -ReferenceObject $fso -DifferenceObject $fsoBU and press Enter.
- You’ll see a list of differences between the two folders.
- If the SideIndicator is pointing left, the file only appears in the first folder.
- If the SideIndicator is pointing right, the file only appears in the second folder.
How to Compare Folders Using WinMerge
A simple way to compare two folders in Windows 11 is to use a third-party app called WinMerge. This app lets you quickly compare folders using a simple GUI.
You can also install a portable version of the app, so you don’t have to install it on your computer.
To compare folders using WinMerge:
- Download WinMerge from the WinMerge website.
- Unzip the folder on your computer.
- Run WinMergeU.exe from the extracted folder.
- Click the Open icon.
- Click the Browse button under 1st File or Folder and navigate to the first folder you want to compare.
- Open the folder and click Open.
- Click the Browse button under 2nd File or Folder and navigate to the second folder you want to compare.
- Open the folder and click Open.
- At the bottom of the window, click the Compare button.
- You will see a list of results indicating the similarities and differences between your two folders.
- The folders are listed above the results, so you can see which folder Right and Left are referring to.
- For some file types, you can also double-click the file name to compare the contents of the files.
Learn More About Windows 11
Knowing how to compare two folders in Windows 11 allows to you check if two folders are exactly the same. If they’re not, you can quickly and easily see the differences between them.
There are plenty of other useful Windows 11 tips that it’s worth knowing. If you want your desktop to look a little more modern, you can learn how to make the taskbar transparent in Windows 11. If you want to run a different OS but don’t want to create a dual boot system, you can learn how to create a virtual machine in Windows 11.
And if things are going wrong, you can learn how to fix a black screen in Windows 11.
Alan
October 18, 2023 at 11:19 pm
Thanks for putting this together, really useful. I’ve tried the PowerShell method, but it doesnt seem to work completely for me. The output has a list of files, all pointing ‘left’, and no results pointing ‘right’. I can look at the folders and see that there are some files in both, and some files in the right side only.