Gammadyne Corporation

FCMP.EXE

FCMP.EXE is a free Windows command line program that compares two files, reporting whether or not they are the same.

Usage

FCMP [/e#] [/f] [/ff"*.xyz"] [/i#] [/n#] [/nologo] [/nr] [/s] [/sdo] [/snp] file1 file2


Compares file1 to file2, and reports if they are the same size and identical, byte for byte.

Switches:
/eEnd at specified offset.
/fCompare all files in two folders.
/ffOnly compare files that match the filter (/f only).
/iStart at specified offset.
/nCompare only the specified number of characters.
/nologoDon't display the program banner.
/nrDon't recursively compare subfolders (/f only).
/sSuppress all output.
/sdoOnly compare files if they have the same date (/f only).
/snpNo error if one of the files has no counterpart (/f only).

Example - Comparing Files

fcmp c:\work\foo.txt d:\work\bar.txt


Sample Output:

FCMP 4.4 - File Comparison Utility - www.Gammadyne.com
Copyright (C) 1994-2024 by Greg Wittmeyer - All Rights Reserved

Files are identical.


Sample Output:

FCMP 4.4 - File Comparison Utility - www.Gammadyne.com
Copyright (C) 1994-2024 by Greg Wittmeyer - All Rights Reserved

Files differ at offset 0
'2' (50) != '1' (49)


Example - Comparing Folders

fcmp /f /ff"*.txt;*.log" /sdo /snp c:\work\ d:\backup\work\


Sample Output:

FCMP 4.4 - File Comparison Utility - www.Gammadyne.com
Copyright (C) 1994-2024 by Greg Wittmeyer - All Rights Reserved

Folders are identical.
312 files were matched.
21 files had different dates.
4 files had no counterpart.


Notes

  • File offsets are 0-based.
  • The %ErrorLevel% environment variable will contain 0 if the files match, 1 if they do not, or 2 if a file could not be opened or read from.

Download

Click the button below to download version 4.4 of FCMP.EXE, released March 29th, 2024.