On Windows 11 (and 10), the File Compare (fc) is a command-line tool that comes part of the system, and it allows you to compare two similar files to determine how they changed over time. Usually, «fc» will be helpful for comparing simple text files, determining the changes made to a script, detecting if a file has been modified, and similar scenarios.
The tool can compare two similar files or the newest version against all the other files in the same location. Also, it includes options to examine the changes at the text level, or in Unicode, ASCII, or binary mode.
In this how-to guide, you will learn steps to use the tool to compare files with Command Prompt on Windows 11 as well as on Windows 10.
Recent updates
This guide has been updated to ensure the instructions are still accurate and reflect you can also use the tool on Windows 11.
How to compare files with the fc command on Windows 11
To compare files with the fc command tool, use these steps:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to browse to the folder with the files you want to compare and press Enter: cd PATH\TO\FILES
In the command, update the path with the location of the folder with the files to compare. This example navigates to the Downloads folder: cd C:\Users\USERACCOUNT\Downloads
- Type the following command to compare two similar files and press Enter: fc filename1.txt filename2.txt
In the command, replace filename1.txt and filename2.txt for the name of the files you want to compare.
- Type the following command to compare two similar files in ASCII mode and press Enter: fc /L filename1.txt filename2.txt
- Type the following command to compare two files displaying only the first line that is different and press Enter: fc /a filename1.txt filename2.txt
- Type the following command to compare two files in Unicode mode and press Enter: fc /u filename1.txt filename2.txt
- Type the following command to compare two files in binary mode and press Enter: fc /b filename1.txt filename2.txt
- Type the following command to compare all the files (*.txt) in the same folder to the new file (filename2.txt) and press Enter: fc *.txt filename2.txt
- Type the following command to compare two files in different locations and press Enter: fc DRIVE:\PATH\TO\filename1.txt DRIVE:\PATH\TO\filename2.txt
In the command, replace DRIVE for the storage location drive letter and \PATH\TO\filename1.txt and \PATH\TO\filename2.txt with the path and name of the files you want to compare.This example compares two files in different folders: fc C:\Users\USERACCOUNT\Downloads\filename1.txt C:\Users\USERACCOUNT\Downloads\new\filename2.txt
All the latest news, reviews, and guides for Windows and Xbox diehards.
- Confirm the output to see the difference between the files.
- Quick tip: You can view the list of options and more examples using the fc /? command.
Once you complete the steps, you will be able to see the difference between two similar files.
While the tool allows you to compare files, remember that this is a basic tool meant to be used with text files and extensions like .exe, .com, .sys, .obj, .lib, or .bin. You may be able to compare files like those from Microsoft Office or images, but you can only compare them at the binary level.
More resources
For more in-depth insights, troubleshooting tips, and the latest updates on Windows 11 and 10, be sure to explore these resources:
- Windows 11 on Windows Central — All you need to know
- Windows 10 on Windows Central — All you need to know
Mauro Huculak has been a Windows How-To Expert contributor for WindowsCentral.com for nearly a decade and has over 15 years of experience writing comprehensive guides. He also has an IT background and has achieved different professional certifications from Microsoft, Cisco, VMware, and CompTIA. He has been recognized as a Microsoft MVP for many years.
,
If you want to compare folders and files in Windows, then keep reading this article because we will show you some very useful and free tools for comparing and synchronizing files and folders.
When you copy a large number of files from one folder to a different destination folder, you want to ensure that all files are copied to the destination. But it’s difficult to manually compare each folder and file individually to make sure they contain the same content.
In this article you will find out how you can easily compare the contents of two different directories and synchronize them to get an exact mirror copy.
3 Best Free Tools to Compare or Synchronize the Content of 2 Folders in Windows 11/10/8/7 OS.
- WinMerge.
- FreeFileSync.
- Total commander.
1. WinMerge
WinMerge is one of the best free tools for comparing and synchronizing files and folders. It is extremely useful for determining what has changed between 2 similar folders, synchronizing their contents or merge them.
You can download the WinMerge tool from its official webpage. Once the download is complete, open the downloaded file and follow the onscreen instructions to install the software.
How to Compare 2 Folders with WinMerge.
1. Launch WinMerge and from the File menu select Open or press the Ctrl + O keys to choose the folders/files that you want to compare.
2. WinMerge gives you the option to compare two (2) or three (3) files or folders at once. To compare two folders or files:
a. in 1st File or Folder, select Browse and choose the file or folder that you want to compare. Do the same for the file or folder you want to compare in the 2nd File or Folder space.
b. For Folder: Filter, if you want to compare all different types of file types, use *.* as the default choice. However, if you want to compare specific file types, specify the file extension in the box. Example: .pdf
c. Finally click Compare. It will take a while for the list of items in both locations to appear depending on the size of the files. It will display the similarities and differences between the files or folders you compare.
3. After a while, the result of the comparison will appear on the screen, with the differences highlighted so you can easily identify them.
Identical files or folders are highlighted in White. Files or folders that are present in only the one location are highlighted Grey, while folders with different content will be highlighted with yellow color.
* Note: In the Comparison result, Left Only means that the file is in the first location (1st File or Folder), while Right Only signifies that the file is present only in the second location (2nd File or Folder).
5. After viewing the comparison result, you can copy, move, compare, rename or delete a file or folder in WinMerge by right-clicking on it and applying the change you want.
How to Synchronize 2 folders with WinMerge:
WinMerge allows you to easily synchronize the contents of 2 different folders and merge them so that both folders end up containing the same files.
1. First, select the folders you want to sync, then hit the Compare button.
2. Now hide the files or folders that are identical, so you can focus on the ones you want to sync. From the View tab, uncheck the Show Identical Items option.
3. On your screen now you’ll see only the files that are either in the 1st folder (Left Only) or the 2nd folder (Right Only).
3a. Now select the files/folders that you want to synchronize (or press Ctrl + A keys to select all of them), then right-click and choose Copy.
3b. Then, from the sub-menu select the location (folder) that you want to update/synchronize.
- If the files or folders of the 1st folder are missing in the 2nd folder: Select Copy > Left to Right.
- If the files or folders of the 2nd folder are missing in the 1st folder : Select Copy > Right to Left.
- If you want to copy all the unidentical files or folders in 1st location to an entirely different folder: Select Copy > Left to…
- If you want to copy all the unidentical files or folders in the 2nd Location to a different location: Select Copy > Right to…
WinMerge Settings.
For efficiency, there are some custom settings you can make to make it easier to work with WinMerge. To open the WinMerge settings, click Options , or click Edit > Options.
The Options dialog allows you to customize many WinMerge features, such as the comparison method, the colors in the comparison results, etc.. To explore and learn more about all the options in WinMerge, visit the WinMerge manual.
2. FreeFileSync
FreeFileSync is another useful software that allows you to perform a detailed comparison on two folders, and synchronize the differences between them. With FreeFileSync, you can automate the backup of your data and save time by copying only the minimum number of files required, because it only copies the differences.
1. Visit the official webpage to download FreeFileSync on your PC.
2. Once it is downloaded, open the file to begin the installation. Installing FreeFileSync is one of the easiest software to set up. You just have to select Next several times to get the program installed.
How to Compare 2 Directories using FreeFileSync:
1. Open FreeFileSync and click the Browse button to choose the folders that you want to compare.
2. At Compare options choose the compare method. You can compare by File time and size, File content, or File size.* When done, click the Compare button to start the folder comparing.
* Note: We will recommend you to compare using File content.
3. Once the folder compare is complete, the blue arrow icon indicates files that only exists on the right side, while the green icon signifies files on the left side. You can select either the blue or green icon to manually replicate the files to the other location. By default, FreeFileSync hides identical files and displays the files that are missing in the selected locations.
How to Synchronize folders & files using FreeFileSync.
1. Open FreeFileSync and click the Browse button to choose the two folders that you want to synchronize.
2. Click Compare to compare the contents in the two locations.
3. Select the Synchronization method. FreeFileSync allows you to synchronize files in two (2) different locations using different methods such as:
- Two way: This variant synchronizes the files in both locations and applies changes to make them similar. Note, that this is the recommended variant when you intend to sync files with FreeFileSync.
- Mirror: This variant allows you to copy the unidentical files in Left-Only, and replicate them in the Right-Only folder. Besides, the mirror variant is known for removing extra files in the right folder just to make sure that files in both locations are mirroring each other.
- Update: Update performs the same function as Mirror, just that it doesn’t replace the files in the right-only location.
- Custom: This variant on the other hand allows you to configure the settings to suit what you want to archive.
4. Finally, click the Synchronize button to start the folder synchronization.
How to use FreeFileSync to Compare and Sync Local Files or Folders with Cloud.
FreeFileSync also has the ability to compare and synchronize local folders or files with the Cloud. (Google Drive, FTP, SFTP). To do that:
1. Select the Cloud icon to Access online storage settings.
2. At the new window opens, select the Connection type (Google Drive, SFTP or SFTP), and then specify the settings of the connection.
3. Once done, click Compare to compare the files between the two locations and optionally click the Synchronize button to synchronize them.
Total Commander
Total commander is a file manager that offers file comparison, directory synchronization, search feature, multiple language support, and built-in FTP clients for syncing cloud drives.
The key features on Total Commander include side-by-side file windows, comparing and synchronizing directories with enhanced search functionality. These features make Total commander a vital administrative tool for file synchronization. You can download Total Commander from the official download page.
To compare the contents of two folders with Total Commander:
1. Choose the first folder in the left pane and do the same for the second folder on the right pane.
2. From the Mark menu select Compare Directories or press SHIFT + F12
To synchronize the contents of two folders with Total Commander:
1. Choose the first folder in the left pane and do the same for the second folder on the right pane.
2. From the Commands menu and select Synchronize Dirs.
3. Finally click Compare and Synchronize.
That’s it! Let me know if this guide has helped you by leaving your comment about your experience. Please like and share this guide to help others.
If this article was useful for you, please consider supporting us by making a donation. Even $1 can a make a huge difference for us in our effort to continue to help others while keeping this site free:
- Author
- Recent Posts
Konstantinos is the founder and administrator of Wintips.org. Since 1995 he works and provides IT support as a computer and network expert to individuals and large companies. He is specialized in solving problems related to Windows or other Microsoft products (Windows Server, Office, Microsoft 365, etc.).
Quick Links
-
Compare Folders From Properties
-
Compare Folders Using Command Prompt
-
Compare Folders With WinMerge
Summary
- One way to compare folders is to right-click your folders one at a time and choose «Properties» for each. Then compare the Properties window of each folder.
- The robocopy command is a command-line tool that can be used to view the differences between folder.
- Use WinMerge to compare the contents and details of folders if you want a graphical tool.
Do you want to compare the number of files or folders or simply visualize the difference between two folders? If so, you have two graphical and one command line method to do that. We’ll show you how to perform the folder comparison task on your Windows 11 or Windows 10 PC.
Compare Folders From Properties
To compare the number of files, subfolders, the size, and the creation date of two folders, use the Properties option in Windows File Explorer. This lets you quickly glance at the main attributes of a folder.
To start, launch File Explorer using Windows+E. Find the first folder, right-click it, and select «Properties.»
Keep the first folder’s «Properties» window open. Then, find the second folder, right-click it, and select «Properties.»
You now have the «Properties» window open for both your folders. Bring these windows side-by-side by dragging them, and you can see the differences in the contents of these folders. For example, you can see how many files both folders have, what size these folders are, and so on.
That gives you a general overview of the differences between your folders.
Compare Folders Using Command Prompt
If you prefer command line methods over graphical ones, use the robocopy command in Command Prompt to see the differences 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 two specified folders and not copy any files.
To use robocopy, first open the Start Menu, search Command Prompt, and launch it.
In Command Prompt, type the following command. Replace «Folder1» with the path to your first folder and «Folder2» with the path to your second folder. Ensure both folder paths are enclosed in double quotes.
To copy a folder’s full path along with double quotes around the path, hold down the Shift key on your keyboard, right-click your folder, and choose «Copy as Path.»
robocopy "Folder1" "Folder2" /L /NJH /NJS /NP /NS
You’ll see the differences between your folders.
If you’re curious as to what the robocopy command does, here’s an explanation of each flag we used with the command:
- L: This tells the command not to copy files but show the log of the files in the specified folder.
- NJH: This flag excludes junctions, hard links, and reparse points from consideration. This way, the command focuses on the regular files in the specified folders.
- NJS: This flag excludes symbolic links from the process.
- NP: This flag excludes folder timestamps.
- NS: This flag excludes file security information.
Compare Folders With WinMerge
If you want more details about the differences in your folders, Windows doesn’t have a built-in tool to help you with that. However, you can use a free third-party app called WinMerge to compare multiple folders.
To use it, launch a web browser on your PC, head to the WinMerge site, and download and install the app. Make sure to download the app’s executable and not the ZIP version.
Open the WinMerge app, then select File > Open in the Menu Bar or press Ctrl+O.
For the «1st File or Folder» field, select «Browse» and choose the first folder to compare.
For the «2nd File or Folder» field, click the «Browse» button and choose the second folder to compare.
In both fields, enable the «Read-Only» option. Click the «Folder: Filter» field and type *.* if it isn’t already there. This ensures the app compares all the files in both the specified folders. Then, at the bottom, click «Compare.»
On the following screen, you’ll see the comparison of the specified folders. You’ll see information like identical files in both folders, files missing from one folder, and so on.
And that’s how you know what one folder has that another doesn’t. This can be really useful if you’re trying to quickly compare different versions of the same folder, like you’d have when you create a backup.