
u: Compares files as Unicode text files. Next, it displays the lines that differ between the two files. FC first displays the name of the first file to compare. Discussion FC reports differences between the two files you specify. Fc is an external command that is available for the following Microsoft operating systems as fc.exe.įC filename filename Purpose: Displays the differences between two files or sets of files. If no lines differ, you will receive a message indicating as such. Once fc is run and completed, it returns lines that differ between the two files. The fc (file compare) command is used to compare two files to one another. And if you use it often you can make a personalized alias for it. This example will do what you need : diff -side-by-side -suppress-common-lines FILE_A FILE_B. I do not know wich distro you have, but, the "diff" on all the servers that we have here (Slackware, CentOs, Debian) is only showing the differences by default. Syntax FC filename1 filename2 Options /A Abbreviate the output of an ASCII comparison, display only first and last lines for each set of differences. Compare the contents of two files or sets of files. Please note that many DOS utilities don't handle UTF-8 encoding.įC.exe. Or you could use the DOS fc command like so (This shows the output of both files so you will have to scan for the differences): fc.exe filea.txt fileb.txt > diff.txt fc is an alias for the Format-Custom cmdlet so be sure to enter the command as fc.exe. Unfortunately, fc reports for every pair of compared files that it didn't find any differences if there are no differences. I want to compare a bunch of files in a cmd.exe batch file using fc. N – This switch can only be used with ASCII but it will show all the corresponding line numbers. L – This will compare your files as ASCII text. U – Use this switch to compare files as Unicode text files.

A – This switch will make FC show only the first and last lines for each group of differences.
