text
stringlengths
0
4.23k
Examples
To make an ASCII comparison of two text files, monthly.rpt and sales.rpt, and display the results in abbreviated format, type:
fc /a monthly.rpt sales.rpt
To make a binary comparison of two batch files, profits.bat and earnings.bat, type:
fc /b profits.bat earnings.bat
Results similar to the following appear:
00000002: 72 43
00000004: 65 3A
0000000E: 56 92
000005E8: 00 6E
FC: earnings.bat longer than profits.bat
If the profits.bat and earnings.bat files are identical, fc displays the following message:
Comparing files profits.bat and earnings.bat
FC: no differences encountered
To compare every .bat file in the current directory with the file new.bat, type:
fc *.bat new.bat
To compare the file new.bat on drive C with the file new.bat on drive D, type:
fc c:new.bat d:*.bat
To compare each batch file in the root directory on drive C to the file with the same name in the root directory on drive D, type:
fc c:*.bat d:*.bat
filesystems
Displays information about the current file system of the volume with focus and lists the file systems that are supported for formatting the volume.
A volume must be selected for this operation to succeed. Use the select volume command to select a volume and shift the focus to it.
Syntax
filesystems
find
Searches for a string of text in a file or files, and displays lines of text that contain the specified string.
Syntax
find [/v] [/c] [/n] [/i] [/off[line]] <"string"> [[<drive>:][<path>]<filename>[...]]
Parameters
Parameter
Description
/v
Displays all lines that don't contain the specified <string>.
/c
Counts the lines that contain the specified <string> and displays the total.
/n
Precedes each line with the file's line number.
/i
Specifies that the search is not case-sensitive.
[/off[line]]
Doesn't skip files that have the offline attribute set.
<"string">
Required. Specifies the group of characters (enclosed in quotation marks) that you want to search for.
[<drive>:][<path>]<filename>
Specifies the location and name of the file in which to search for the specified string.
/?
Displays help at the command prompt.
<string>
<string>
<"string">
[<drive>:][<path>]<filename>
Exit codes
Exit code
Description
0
The searched string was found
1
Searched string not found
2
Searched file not found or invalid command line switch was given
Remarks
If you don't use /i, this command searches for exactly what you specify for string. For example, this command treats the characters a and A differently. If you use /i, however, the search becomes case insensitive, and it treats a and A as the same character.
a
A