Skip to Content
Windows XP Pocket Reference
book

Windows XP Pocket Reference

by David A. Karp
December 2002
Beginner to intermediate
192 pages
7h 4m
English
O'Reilly Media, Inc.
Content preview from Windows XP Pocket Reference

Name

File Compare (fc) — \windows\system32\fc.exe

Synopsis

File Compare (fc.exe) compares the contents of two files (or more, using wildcards), and displays the differences (if any). If the files are identical, fc.exe will report FC: no differences encountered. If the files are different, fc.exe lists the differing lines. To compare two files, type fc bill.txt marty.txt. The output will look something like this:

Comparing files Bill.txt and Marty.txt
***** Bill.txt
Way down Louisiana close to New Orleans
Way back up in the woods among the evergreens
There stood a log cabin made of earth and wood
***** Marty.txt
Way down Louisiana close to New Orleans
Way back up in the woods among the antihistamines
There stood a log cabin made of earth and wood
*****

For each line or sequence of lines that is found to differ in the two files, fc.exe prints out a pair of excerpts from each file. The first and last line in each excerpt are what the two files have in common, and are included for context. The lines in between (only a single line in this example) show the differences. The syntax for fc.exe is as follows:

fc file1 file2 [/a] [/b] [/c] [/lbn] [/n] [/t] [/w] [/off] [/nnn]

The options file1, file2, /c, and /off and are the same as those for File Compare (comp), discussed previously.

Option

Description

/a

Display only first and last lines for each set of differences, as opposed to the default of every different line.

/b

Treat the files as binary and perform the comparison on a byte-by-byte ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Windows XP Hacks

Windows XP Hacks

Preston Gralla
Windows XP Professional: The Missing Manual

Windows XP Professional: The Missing Manual

David Pogue, Craig Zacker, L.J. Zacker
Windows XP Cookbook

Windows XP Cookbook

Robbie Allen, Preston Gralla

Publisher Resources

ISBN: 0596004257Errata