FC – Compare the contents of two files with FileCompare and display differences

It happens from time to time that the content of two files should be compared to find out the differences between the files. This content-related comparison of files can be carried out with numerous third-party tools, but Microsoft has always supplied the tool


with out. It is a ” FileCompare ” tool which is used at the command line level and which has numerous parameters. You can view the help for the file comparison tool FC by clicking on the following call.

FC /?

FC FileCompare

Microsoft describes this Windows tool as follows:

Compares two files or two sets of files and shows the differences between them.

The following parameters are available with the FC Tool .

FC parameters FC Description of the parameter
/ A Displays only the first and last lines of each set of
/ B Performs a binary comparison.
/ C Compares case-insensitive.
/ L Compares files as ASCII text files.
/ LBn Sets the maximum number of successive, different
lines to the specified number n.
/ N Displays the line numbers in an ASCII comparison.
/OFFLINE] Does not skip offline files.
/ T Doesn’t expand tab characters to spaces.
/ U Compares files as UNICODE text files.
/ W Compresses tabs and spaces for the comparison process.
/ nnnn Number of consecutive lines that
must match again after a difference .

The “FC” tool from Windows is ideal for evaluating differences between text files , source codes or binary files .

In order to compare the content of 2 text files, for example, the following call is necessary.

FC “Path Filename1” “Path Filename2”

In practice, this looks like this:

FC comparison of second text files

In this example, we have copied part of the text of this article into two text files and made a small adjustment to the content. FC then outputs a section of the text files where the difference between the files can be seen. We have this for you through the arrowhead

Compare binary files

Of course, this also works with normal binary files, regardless of whether they are images, program files or videos. When comparing binary files , the parameter “/ B” must be added, the command is then

FC “Path Filename1” “Path Filename2” / B

Compare binary files

Here you can see how we compared 2 JPG image files . We had to change 3 bytes, and only these changes in the 100KB large file are then used as file difference output.

If the changes to the files to be compared are very extensive, the output in the command prompt is very cumbersome to edit. Then you should redirect the output to a text file , which you can then edit and evaluate.

The FC FileCompare redirection to a file then works with the following command:

FC “Path Filename1” “Path Filename2”> “Path Output File”

If you are looking for other useful Windows commands , we recommend the following posts:

– End the hung task or program with a command – Increase the
Windows 10 uninstall period of 10 days
– Ping, IPConfig and Tracert as PowerShell commands
– Read WindowsUpdate.log for Windows 10 or reformat using PowerShell – Install
Windows roles and features with the PowerShell
– Computer
Read system information with PowerShell – Prepare the Windows client for remote PowerShell commands with WINRM – Edit
local users and groups with
– Determine Windows system runtime with PowerShell – Create Windows 10 system restore point with PowerShell
– Shut down Windows and restart with PowerShell commands
– Repair Windows component store with DISM and PowerShell commands
– Switch off UAC (user account control ) via PowerShell or registry in Windows 10
– PowerShell command to deactivate the firewall