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.
- Go to 'Start / run / type CMD'.
- Once in the Command prompt type fc
- Then drag both files into the window. This will save you time typing the paths and names of the files.
- 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
74: access list 101 permit ip any any