FC command compares the contents of text or binary files and can compare both Unicode and ASCII text.
FC [pathname1] [pathname2]
FC /B [pathname1] [pathname2]
Suppose two files file1.txt and file2.txt are on Desktop (in the same folder/directory), then Open Command prompt-> change the directory to Desktop and use the FC command as shown below.
If the two files are identical, then it displays “FC: no differences encountered”
<- Response if one of the files doesn’t exist or file name is wrong
<- Response if the files are different
<- Response if the files are different and if you perform binary comparison
You can use FC command anywhere in command prompt to compare files by providing full path of the files (see below pic). If the files are in different folders, then also you have to provide full path for files in order to perform comparison using FC.