FC
(file compare)
比较两个文件或两个文件集并显示它们之间的不同
FC
[/A] [/C] [/L] [/LBn] [/N] [/OFF[LINE]]
[/T] [/U] [/W] [/nnnn]
   [drive1:][path1]filename1
[drive2:][path2]filename2
FC
/B [drive1:][path1]filename1 [drive2:][path2]filename2
  /A        
    只显示每个不同处的第一行和最后一行。
  /B        
    执行二进制比较。
  /C             不分大小写。
  /L             将文件作为
ASCII 文字比较。
  /LBn          将连续不匹配的最大值设为指定 的行数。
  /N        
    在 ASCII 比较上显示行数。
  /OFF[LINE] 不要跳过带有脱机属性集的文件。
  /T        
    不要将 tab 扩充到空格。
  /U        
    将文件作为 UNICODE 文字文件比较。
  /W        
   为了比较而压缩空白(tab 和空格)。
  /nnnn        指定不匹配处后必须连续匹配的行数。
  [drive1:][path1]filename1
            
指定要比较的第一个文件或第一个文件集。
  [drive2:][path2]filename2
            
指定要比较的第二个文件或第二个文件集。 
★★★★★实例★★★★★:
假设你想对名为MONTH.RPT及SALES.RPT的两个文本文件进行ASCII比较,并且要用简化格式来显示比较的结果,为此,要键入下面的命令: 
fc /a monthly.rpt
sales.rpt 
为了对两名为PROFITS.BAT及EARNINGS.BAT的批处理文件进行二进制比较,要输入的命令: 
fc /b profits.bat
earnings.bat 
此命令的结果如下: 
00000002: 72 43 
00000004: 65 
0000000E: 56 92 
00000012: 6D 
00000013: 0D 
00000014: 0D 
00000015: 
0000001E: 43 
00000022: 72 44 
..。 
..。 
..。 
000005E0: 00 61 
000005E1: 00 73 
000005E2: 00 73 
000005E3: 00 69 
000005E4: 00 67 
000005E5: 00 6E 
000005E6: 00 6D 
000005E7: 00 65 
000005E8: 00 6E 
FC:EARNING.BAT比 PROFITS.BAT长。 
如果PROFITS.BAT与EARNINGS.BAT相同,FC将显示下列信息: 
FC:
no differences encountered 
为了把当前目录中的每一个.BAT文件与NEW.BAT文件相比较,可输入下面的命令: 
fc *.bat new.bat 
为了把驱动器C上的文件NEW.BAT与驱动器D上的文件NEW.BAT进行比较,需输入下面的命令: 
fc c:new.bat
d:*.bat 
为了把驱动器C根目录下的每一个批处理文件与驱动器D根目录下同名的文件进行比较,需输入下面的命令: 
fc c:\*.bat d:*.bat
Compares
two files or sets of files and displays the differences between them
FC
[/A] [/C] [/L] [/LBn] [/N] [/OFF[LINE]]
[/T] [/U] [/W] [/nnnn]
   [drive1:][path1]filename1
[drive2:][path2]filename2
FC
/B [drive1:][path1]filename1 [drive2:][path2]filename2
  /A        
Displays only first and last lines for each set of differences.
  /B        
Performs a binary comparison.
  /C        
Disregards the case of letters.
  /L        
Compares files as ASCII text.
  /LBn       Sets the
maximum consecutive mismatches to the specified number of lines.
  /N        
Displays the line numbers on an ASCII comparison.
  /OFF[LINE] Do
not skip files with offline attribute set.
  /T        
Does not expand tabs to spaces.
  /U        
Compare files as UNICODE text files.
  /W        
Compresses white space (tabs and spaces) for comparison.
  /nnnn      Specifies the number of consecutive lines that must match
after a mismatch.
  [drive1:][path1]filename1
            
Specifies the first file or set of files to compare.
  [drive2:][path2]filename2
            
Specifies the second file or set of files to compare.