On Windows 10, “fc” is a command-line tool that comes built-in to 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. And it includes options to examine the changes at the text level, or in Unicode, ASCII, or binary mode.
In this Windows 10 guide, you will learn steps to use the fc tool to compare files with Command Prompt.
How to compare files with the fc command on Windows 10
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 PATHTOFILES
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:UsersUSERACCOUNTDownloads
-
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.
Source: Windows Central
-
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
Source: Windows Central
-
Type the following command to compare two files in Unicode mdoe and press Enter:
fc /u filename1.txt filename2.txt
Source: Windows Central
-
Type the following command to compare two files in baniry mode and press Enter:
fc /b filename1.txt filename2.txt
Source: Windows Central
-
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
Source: Windows Central
-
Type the following command to compare two files in different locations and press Enter:
fc DRIVE:PATHTOfilename1.txt DRIVE:PATHTOfilename2.txt
In the command, replace DRIVE for the storage location drive letter and PATHTOfilename1.txt and PATHTOfilename2.txt with the path and name of the files you want to compare.
This example compares two files in different folders:
fc C:UsersUSERACCOUNTDownloadsfilename1.txt C:UsersUSERACCOUNTDownloadsnewfilename2.txt
Source: Windows Central
-
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 use it 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 Windows 10 resources
For more helpful articles, coverage, and answers to common questions about Windows 10, visit the following resources:
With Windows 10X on the backburner, what’s next for Windows as a whole?
With recent reports revealing that Microsoft has put Windows 10X on the backburner, the question around what the future looks like for Windows is more apparent than ever. Windows 10X was supposed to lay the foundation for the next generation of Windows, but with that no longer happening, where does that leave Windows as a whole?