You can compare two files using the fc.exe and the comp.exe file compare commands. You can use fc.exe to compare two ASCII or binary files on a line-by-line basis. windiff.exe utility, a tool that graphically compares the contents of two ASCII files, or the contents of two folders that contain ASCII files, to verify whether they are the same.

If you want to find how two similar files have undergone changes over time, there is a built-in command on Windows that lets you compare. That command is fc. This command is useful in comparing two text files and know how they are changed in its script and its modifications. With ‘fc‘ command, you can compare a text file with its latest version or find changes at the script level in different scripts like Binary, Unicode, or ASCII. Let’s see how we can use ‘fc’ command and compare two Files for changes With Command Prompt on Windows 10/11.

Compare two Files for Changes using FC.exe command-line

There are different parameters in fc command which you can use it to achieve different result after entering the syntax in Command Prompt.

Usage of the fc command

How do I compare two files in Windows?

You can use fc command to compare two text files for changes or use the windiff.exe utility that comes with the Windows installation. The tool helps you graphically compare the contents of two ASCII files, or the contents of two folders that contain ASCII files, to verify if they are the same or not. You can also compare two text files in Windows using fc command. It has different parameters to do different types of comparisons. [] [] 1] If you want to compare two files names June and July in ASCII format and display the result in an abbreviated format, you can use: fc /a june.rpt july.rpt 2] If you want to make a binary comparison of two bat files named June and July, use the following syntax: fc /b june.bat july.bat 3] If you want to compare every bat file in a directory with July.bat file, use the following syntax: fc .bat july.bat 4] If you want to compare July.bat file on C drive with July.bat file on D drive, you can use: fc c:july.bat d:.bat 5] If you want to compare each batch file in the root directory on drive C to the file with the same name in the root directory on drive D, you can use: fc c:.bat d:.bat These are some of the commonly usable syntax using fc command in Command Prompt. You need to understand the parameters perfectly and write your own syntax if you have special requirements. Microsoft has some detailed explanations of some regularly used fc commands. Related Read: Useful Commands to Manage Files and Folders using Command Prompt.

How to compare two Files for changes using Command Prompt - 58How to compare two Files for changes using Command Prompt - 73