Windows – Comparing 2 files

From time to time you may need to compare 2 files, i find this is useful for comparing old device configurations such as routers or firewalls to see what has changed. The program is fc (file compare). Which is a small windows program run via the Command Prompt.

This is a short guide on how to quickly see the differences using Windows DOS.

  1. Go to ‘Start / run / type CMD’.
  2. Once in the Command prompt type fc
  3. Then drag both files into the window. This will save you time typing the paths and names of the files.
  4. Press enter to see the differences.

The syntax should be something like this,

fc [file1] [file2] /A

Below is an example of the output,

C:\>fc C:\file1.txt C:\file2.txt /A
Comparing files C:\file1.txt and C:\file2.txt
***** C:\file1.txt
***** C:\file2.txt
   74:  access list 101 permit ip any any

Rick Donato

Want to become a Windows expert?

Here is our hand-picked selection of the best courses you can find online:
Windows Server 2019 Administration course
Windows 10 Troubleshooting course
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial