GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing ss64.com — FC - file compare command - Windows CMD FC.exeCompare the contents of two files or sets of files. Display any lines which do NOT match. Syntax
FC [options] [drive1:][path1] filename1 [drive2:][path2] filename2
Options
/A Abbreviate the output of an ASCII comparison, display only first and last lines
for each set of differences.
/B Perform a binary comparison. FC compares the two files byte by byte and does not attempt
to resynchronize the files after finding a mismatch.
This is the default mode for comparing files that have the following file extensions:
.exe, .com, .sys, .obj, .lib, or .bin.
/C Do a case insensitive string comparison
/L Compare the files in ASCII mode. Fc compares the two files line by line and attempts to resynchronize
the files after finding a mismatch.
This is the default mode for comparing non binary files, see /B.
/LBn Set the n number of lines for the internal line buffer. The default length of the line buffer is 100 lines.
If the files being compared have more than this number of consecutive differing lines, FC cancels the comparison.
/N Display line numbers during an ASCII comparison.
/T Prevent FC from converting tabs to spaces.
The default behavior is to treat tabs as spaces, with stops at each eighth character position.
/U Compares files as Unicode text files.
/W Compress white space (that is, tabs and spaces) during the comparison.
If a line contains many consecutive spaces or tabs, /w treats these characters as a single space.
When used with the /W command-line option, FC ignores (and does not compare) white space at the beginning and end of a line.
/nnnn The a number of consecutive lines that must match before FC considers the files to be resynchronized.
If the number of matching lines in the files is less than nnnn, FC displays the matching lines as differences.
The default value is 2.
[ drive1 : ][ path1 ] filename1 The location and name of the first file you want to compare.
Filename1 is required.
[ drive2 : ][ path2 ] filename2 The location and name of the second file you want to compare.
Filename2 is required.
Wildcards ( * and ? ) may be used with filename1 or filename2, FC will then compare all the matching files.
PowerShell also has an Alias FC for the Format-Custom cmdlet, therefore to run the 'old' FC under PowerShell you can explicitly run C:\windows\system32\fc.exe Errorlevels
Comparison order
Binary Comparisons
PowerShell
ExamplesMake a binary comparison of two DLL files:
Compare two files and report if they are identical: (FC /B "new.dll" "old.dll" | Find "FC: no differences encountered") > nul && (Echo The Files match.) Make an ASCII comparison of two text files and display the result in abbreviated format:
# Oh lord won’t you buy me a Mercedes Benz, my friends all drive Porsches, I must make amends # ~ Janice Joplin Related commandsCOMP - Compare two files and display any characters which do NOT match. Copyright © 1999-2026 SS64.com
Some rights reserved |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |