Categories
Interior

How to use fc (file compare) from the windows command prompt

Jump Right In:

What Is The File Compare (FC) Command?

How To Use FC To Compare Files.

Compare Multiple Files At Once.

Binary File Comparison.

Useful Parameters.

Examples.

Help Output.​

What We’ll Learn:

Welcome!
This guide is all about comparing files directly from the windows command line.

  • We’ll start by learning, exactly what the FC command is and what function it serves.
  • We’ll then learn, how to use the FC Command to compare two files.
  • How to take advantage of wildcards and compare a number of files all at once.
  • And finally, we’ll take a look at a few useful parameters and numerus usage examples.

Lets get started!

What Is The File Compare (FC) Command?​

If you are a programmer or a writer it is very useful to know if there are any differences between two files.

You can use the command line to display any differences using the FC command.

FC stands for file compare and as the name implies it can be used to make binary or text file comparisons on both ASCII and Unicode text.

We are going to learn how to do just that in this short guide.

If you would like to follow along, open your command line and navigate to a directory of your choice (i.e. Desktop) and use the echo command along with a redirector to create two files.

Two files should immediately be created in you current directory.

Now that our files have been created lets learn how to compare them using the FC command.

How To Use FC To Compare Files​:

Using the FC command is easy, to compare the files we just created simply type the FC command followed by the names of our files one after the other.

How to use fc (file compare) from the windows command prompt

The FC command will immediately output every line that is different between the two files, allowing you to quickly and efficiently assess any differences.

If the command line was not able to locate your files even tho you are sure they are located in he same directory as the command line, it might have been so because the names of your files contain spaces within their name.

If that’s the case you need to surround the names of your files with quotes.

That’s because the quotes tell the command line that the spaces separating the words do not constitute an additional parameter and are just a continuation of the name of your file.

This is what the command should look like:

You can use the FC command to compare files that are located in a different directory than the one you are currently on, by typing their location followed by a backward slash and the name of your file instead of the name of your file directly.

Replace with your computers name.

The FC command by default differentiates words based on their casing, meaning, for example, that the words “Awesome” and “awesome” will be deemed different by the FC command because of their casing difference.

If this is not the desired behavior use the /c parameter to make the FC command ignore any such differences.

Jump Right In:

What Is The File Compare (FC) Command?

How To Use FC To Compare Files.

Compare Multiple Files At Once.

Binary File Comparison.

Useful Parameters.

Examples.

Help Output.​

What We’ll Learn:

Welcome!
This guide is all about comparing files directly from the windows command line.

  • We’ll start by learning, exactly what the FC command is and what function it serves.
  • We’ll then learn, how to use the FC Command to compare two files.
  • How to take advantage of wildcards and compare a number of files all at once.
  • And finally, we’ll take a look at a few useful parameters and numerus usage examples.

Lets get started!

What Is The File Compare (FC) Command?​

If you are a programmer or a writer it is very useful to know if there are any differences between two files.

You can use the command line to display any differences using the FC command.

FC stands for file compare and as the name implies it can be used to make binary or text file comparisons on both ASCII and Unicode text.

We are going to learn how to do just that in this short guide.

If you would like to follow along, open your command line and navigate to a directory of your choice (i.e. Desktop) and use the echo command along with a redirector to create two files.

Two files should immediately be created in you current directory.

Now that our files have been created lets learn how to compare them using the FC command.

How To Use FC To Compare Files​:

Using the FC command is easy, to compare the files we just created simply type the FC command followed by the names of our files one after the other.

How to use fc (file compare) from the windows command prompt

The FC command will immediately output every line that is different between the two files, allowing you to quickly and efficiently assess any differences.

If the command line was not able to locate your files even tho you are sure they are located in he same directory as the command line, it might have been so because the names of your files contain spaces within their name.

If that’s the case you need to surround the names of your files with quotes.

That’s because the quotes tell the command line that the spaces separating the words do not constitute an additional parameter and are just a continuation of the name of your file.

This is what the command should look like:

You can use the FC command to compare files that are located in a different directory than the one you are currently on, by typing their location followed by a backward slash and the name of your file instead of the name of your file directly.

Replace with your computers name.

The FC command by default differentiates words based on their casing, meaning, for example, that the words “Awesome” and “awesome” will be deemed different by the FC command because of their casing difference.

If this is not the desired behavior use the /c parameter to make the FC command ignore any such differences.

Compare the contents of two files or sets of files. Display any lines which do NOT match.

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

-1 Invalid syntax (e.g. only one file passed)
0 The files are identical.
1 The files are different.
2 Cannot find at least one of the files.
For an invalid switch (with two passed files) an error message is printed but the errorlevel is not changed.

The messages returned by FC are language/locale dependent, so to reliably identify 2 identical files use redirection syntax:

Comparison order

When FC is used for an ASCII comparison, it will display differences between two files in the following order:

  1. Name of the first file
  2. Lines from filename1 that differ between the files
  3. First line to match in both files
  4. Name of the second file
  5. Lines from filename2 that differ
  6. First line to match

Binary Comparisons

/B displays mismatches found during a binary comparison as follows: xxxxxxxx: yy zz

The value of xxxxxxxx specifies the relative hexadecimal address for the pair of bytes, measured from the beginning of the file. Addresses start at 00000000.
The hexadecimal values for yy and zz represent the mismatched bytes from filename1 and filename2, respectively.

When comparing binary files that are larger than available memory, FC compares both files completely, overlaying the portions in memory with the next portions from the disk.

PowerShell

Like every other external command FC can be run under PowerShell instead of CMD, however there is one extra complication for FC and that is the standard PowerShell alias FC which redirects to the Format-Custom cmdlet.

To avoid that, use the call operator to run FC.exe:

Make a binary comparison of two DLL files:

C:\> FC /b new.dll old.dll

Make an ASCII comparison of two text files and display the result in abbreviated format:

C:\> FC /a C:\demo\input.txt H:\work\output.txt

# Oh lord won’t you buy me a Mercedes Benz, my friends all drive Porsches, I must make amends # – Janice Joplin

How to use fc (file compare) from the windows command promptSource: Windows Central

On Windows 10, “fc” is a command-line tool that comes built-in to the system, and it allows you to compare two similar files to determine how they changed over time. Usually, fc will be helpful for comparing simple text files, determining the changes made to a script, detecting if a file has been modified, and similar scenarios.

The tool can compare two similar files or the newest version against all the other files in the same location. And it includes options to examine the changes at the text level, or in Unicode, ASCII, or binary mode.

In this Windows 10 guide, you will learn steps to use the fc tool to compare files with Command Prompt.

How to compare files with the fc command on Windows 10

To compare files with the fc command tool, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

Type the following command to browse to the folder with the files you want to compare and press Enter:

In the command, update the path with the location of the folder with the files to compare.

This example navigates to the Downloads folder:

Type the following command to compare two similar files and press Enter:

fc filename1.txt filename2.txt

In the command, replace filename1.txt and filename2.txt for the name of the files you want to compare.

How to use fc (file compare) from the windows command promptSource: Windows Central

Type the following command to compare two similar files in ASCII mode and press Enter:

fc /L filename1.txt filename2.txt

Type the following command to compare two files displaying only the first line that is different and press Enter:

fc /a filename1.txt filename2.txt

How to use fc (file compare) from the windows command promptSource: Windows Central

Type the following command to compare two files in Unicode mdoe and press Enter:

fc /u filename1.txt filename2.txt

How to use fc (file compare) from the windows command promptSource: Windows Central

Type the following command to compare two files in baniry mode and press Enter:

fc /b filename1.txt filename2.txt

How to use fc (file compare) from the windows command promptSource: Windows Central

Type the following command to compare all the files (*.txt) in the same folder to the new file (filename2.txt) and press Enter:

fc *.txt filename2.txt

How to use fc (file compare) from the windows command promptSource: Windows Central

Type the following command to compare two files in different locations and press Enter:

fc DRIVE:\PATH\TO\filename1.txt DRIVE:\PATH\TO\filename2.txt

In the command, replace DRIVE for the storage location drive letter and \PATH\TO\filename1.txt and \PATH\TO\filename2.txt with the path and name of the files you want to compare.

This example compares two files in different folders:

fc C:\Users\USERACCOUNT\Downloads\filename1.txt C:\Users\USERACCOUNT\Downloads\new\filename2.txt

How to use fc (file compare) from the windows command promptSource: Windows Central

Confirm the output to see the difference between the files.

Quick tip: You can view the list of options and more examples using the fc /? command.

Once you complete the steps, you will be able to see the difference between two similar files.

While the tool allows you to compare files, remember that this is a basic tool meant to use it with text files and extensions like .exe, .com, .sys, .obj, .lib, or .bin. You may be able to compare files like those from Microsoft Office or images, but you can only compare them at the binary level.

More Windows 10 resources

For more helpful articles, coverage, and answers to common questions about Windows 10, visit the following resources:

How to use fc (file compare) from the windows command prompt

Handhelds are hot again. Here’s how Xbox and PlayStation could capitalize.

With the rise of the Nintendo Switch, game streaming services, and mobile gaming, handheld gaming devices are getting hot again. Here’s a look at how both Xbox and PlayStation could (and should) capitalize in the portable gaming market.

How to use fc (file compare) from the windows command prompt

Is Valve’s Steam Deck doomed to fail?

Valve has the money and talent to make incredible hardware. But is the market ready for its latest invention?

How to use fc (file compare) from the windows command prompt

Song of Iron is officially releasing for Xbox and PC on August 31

Song of Iron is an incredible-looking indie game created by a solo developer, and it finally has a release date. Embark on an epic Norse-inspired adventure on Aug. 31, 2021, on Xbox Series X|S, Xbox One, and PC.

How to use fc (file compare) from the windows command prompt

These are the best PC sticks when you’re on the move

Instant computer — just add a screen. That’s the general idea behind the ultra-portable PC, but it can be hard to know which one you want. Relax, we have you covered!

Compares two files or sets of files and displays the differences between them.

Syntax

Parameters

Parameter Description
/a Abbreviates the output of an ASCII comparison. Instead of displaying all of the lines that are different, fc displays only the first and last line for each set of differences.
/b Compares the two files in binary mode, 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 Ignores the letter case.
/l Compares the files in ASCII mode, line-by-line, and attempts to resynchronize the files after finding a mismatch. This is the default mode for comparing files, except files with the following file extensions: .exe, .com, .sys, .obj, .lib, or .bin.
/lb Sets the number of lines for the internal line buffer to N. The default length of the line buffer is 100 lines. If the files that you are comparing have more than 100 consecutive differing lines, fc cancels the comparison.
/n Displays the line numbers during an ASCII comparison.
/off[line] Doesn’t skip files that have the offline attribute set.
/t Prevents 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 Compresses 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 /w, fc ignores white space at the beginning and end of a line.
/ Specifies the number of consecutive lines that must match following a mismatch, 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.
[ :][

Remarks

This command is implemeted by c:\WINDOWS\fc.exe. You can use this command within PowerShell, but be sure to spell out the full executable (fc.exe) since ‘fc’ is also an alias for Format-Custom.

When you use fc for an ASCII comparison, fc displays the differences between two files in the following order:

Name of the first file

Lines from filename1 that differ between the files

First line to match in both files

Name of the second file

Lines from filename2 that differ

First line to match

/b displays mismatches that are found during a binary comparison in the following syntax:

The value of XXXXXXXX specifies the relative hexadecimal address for the pair of bytes, measured from the beginning of the file. Addresses start at 00000000. The hexadecimal values for YY and ZZ represent the mismatched bytes from filename1 and filename2, respectively.

You can use wildcard characters (* and ?) in filename1 and filename2. If you use a wildcard in filename1, fc compares all the specified files to the file or set of files specified by filename2. If you use a wildcard in filename2, fc uses the corresponding value from filename1.

When comparing ASCII files, fc uses an internal buffer (large enough to hold 100 lines) as storage. If the files are larger than the buffer, fc compares what it can load into the buffer. If fc doesn’t find a match in the loaded portions of the files, it stops and displays the following message:

Resynch failed. Files are too different.

When comparing binary files that are larger than the available memory, fc compares both files completely, overlaying the portions in memory with the next portions from the disk. The output is the same as that for files that fit completely in memory.

Examples

To make an ASCII comparison of two text files, monthly.rpt and sales.rpt, and display the results in abbreviated format, type:

To make a binary comparison of two batch files, profits.bat and earnings.bat, type:

Results similar to the following appear:

If the profits.bat and earnings.bat files are identical, fc displays the following message:

To compare every .bat file in the current directory with the file new.bat, type:

To compare the file new.bat on drive C with the file new.bat on drive D, type:

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:

Comparing the difference between two text-based files using windows command prompt

If you work on a lot of text-based files, then sometimes you modify a specific file and get a new version of the old version. Sometimes you need to compare two files to see the differences. These tasks repeatedly happen in software or web development, design or whether it is about coding or programming.

Probably, you create a lot of versions of a source file while updating your software or updating your design layouts. And you name them like this: app.c , app-new.c , app-final.c , etc. But in case, you want to know, what you have been changed or updated from the previous versions.

As your source files may contain hundreds of thousand lines of code. So it is tough to find out the differences between the two versions. If you are running Microsoft Windows, then it comes with a built-in file comparing tools, that is based on the command line or command prompt.

In the Windows command prompt, using the FC command you can easily compare two files. FC stands for File Compare. This tool will execute the difference between the two mentioned files. Now we will see, how to compare two files using FC command in the windows command prompt. Here we go;

How to compare two files using command prompt

First of all, open up your terminal by typing in cmd in the Run window. And navigate to the folder where all of your versions are exist. In my case, I have saved my versions on the desktop. So I am changing the directory to Desktop using cd Desktop command.

I have created two C program files on my desktop called app-old.c and app-new.c . Now we are going to compare them using the FC command.

The app-old.c looks like this:

And app-new.c looks like this;

After navigating the Desktop folder, run the following command to find the difference.

After running the above command, windows will instantly start the comparing processes. After processing the entire file, it will only execute the block of codes, where the code appears to be different.

In my case, after running the command for app-old.c and app-new.c , we will get the following result in the command line:

After execution, notice that the only block is showing where I made a simple string difference”Hello World” and Hello, new World” in the HelloWorld function. In this way, you can compare any kind of text-based files of any size. It does not matter, how many lines contain your files. Windows will take care of it automatically.

Share on social media or link this article to your website. Sharing is caring! 🙂

How to use fc (file compare) from the windows command prompt

The fc (file compare) command is used to compare two files to one another. Once fc is run and completed, it returns lines that differ between the two files. If no lines differ, you will receive a message indicating as such.

  • Availability
  • Fc syntax
  • Fc examples

Availability

Fc is an external command that is available for the following Microsoft operating systems as fc.exe.

Fc syntax

Compares two files or sets of files and displays the differences between them.

/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.
/T Does not expand tabs to spaces.
/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.

Fc examples

Gives a file comparison between the config.sys and the autoexec.bat in the current directory.

Gives a file comparison between the config.sys and the autoexec.bat in the root directory in binary format.

If your directory or file name has spaces, it may be necessary to add quotes around the complete path as shown in this example.

Feb 20, 2019
Comment

If you need to compare files or folders, you’ll find there is no shortage of apps that can help you do the job. If you need to compare folder content from the Command Prompt, Windows 10 comes with a built-in tool called RoboCopy. It’s a Microsoft tool that comes bundled in Window 10 as of its recent versions. It’s a pretty useful tool that can compare folder content among other things. All you need to know is the correct command to run.

Compare folder contents

In order to compare folder contents, you need the complete path to the two folders that you want to compare. It’s easy enough to get. Open both folders in File Explorer and click inside the location bar. Copy the folder locations and paste it in the following command. Replace Path 1 and Path2 with the path to the two folders that you want to compare.

Syntax

Example

How to use fc (file compare) from the windows command prompt

Understanding results

For the above command, the Command Prompt returned the following results. When you run this command on your system, the file names will be different however The *EXTRA File and the New File title will precede the files that RoboCopy finds. You need to understand the result in order find the difference between the two folders that you just compared.

RoboCopy is showing you unique files found in the two folders that you compared. This means that all the files listed in the results are present on only one of the two folders that you compared.

The files that are preceded by *EXTRA Files are the files that are present in the second folder that you entered in the command. From the previous example, the files alex-1315367-unsplash.jpg, beautiful-bloom-blooming-132474.jpg, and irina-iriser-1323394-unsplash.jpg are present in Test Folder 2 and are NOT present in Test Folder 1.

It is then obvious that the file names preceded by New File are all files that are present in the first folder that you entered and are not present in the second folder. Again, continuing with the initial example, abstract.jpg, Clouds_minimalistic_binary_storage_2560x1600.jpg, and Triangle_1920x1080.jpg are all present in Test Folder 1 and are NOT present in Test Folder 2.

The command will not list the files that are common between the two folders.

How to use fc (file compare) from the windows command prompt

If you’re having trouble figuring out the results, run the command on two dummy folders which only have a small number of files so that you can compare the results with the actual files in the folders and understand them.

Need a quick way to copy a file to multiple folders at once? There’s a little command that can do just that.

Der er et fantatik kommandolinjeværktøj, der kan bruge til at ammenligne filer for at e, om der er indhold eller binære kodeforkelle, om du kan få adgang til, hvi du bruger en pc.

Indhold

  • File Compare’s switche og parametre
  • FC’s syntaks
  • Lad os øve

Der er et fantastisk kommandolinjeværktøj, der kan bruges til at sammenligne filer for at se, om der er indhold eller binære kodeforskelle, som du kan få adgang til, hvis du bruger en pc. File Compare eller FC, som vi vil henvise til, er herfra og ud, er et simpelt program, der sammenligner indholdet af tekst eller binære filer og er i stand til at sammenligne både ASCII- og Unicode-tekst. Du kan bruge dette værktøj til at vise linjer fra to filer eller to sæt filer, der ikke matcher de andre.

File Compare’s switche og parametre

  1. / B – Denne switch udfører en binær sammenligning.
  2. / C – Hvis du har brug for en sammenligning af store og små bogstaver, skal du bruge denne kontakt.
  3. /EN – Denne switch får FC til at vise kun den første og sidste linje for hver gruppe af forskelle.
  4. / U – Brug denne switch til at sammenligne filer som Unicode-tekstfiler.
  5. / L – Dette sammenligner dine filer som ASCII-tekst.
  6. / N – Denne switch kan kun bruges med ASCII, men den viser alle de tilsvarende linjenumre.
  7. / LBn – Udskift “n” med et tal for at begrænse antallet af på hinanden følgende forskellige linjer, som FC vil læse, før den afbrydes. Standard, hvis du ikke angiver et tal, er 100 linjer uoverensstemmende tekst.
  8. /nnnn – Udskiftning af “n’erne” her fortæller FC, at når den finder uoverensstemmende linjer, kan den kun fortsætte, hvis den finder “n” fortløbende matchende linjer efter uoverensstemmelsen. Dette er nyttigt, hvis du vil forhindre, at to filer bliver ekstremt ude af synkronisering.
  9. / T – Denne switch vil bede FC om ikke at udvide fanerne til mellemrum.
  10. / W – Hvis du bruger denne switch, komprimerer FC det hvide mellemrum (faner og mellemrum) under sammenligningen af ​​dine filer.

Der er kun en parameter, du skal angive, men du skal indtaste to forekomster af den. Dette er Pathname-parameteren, hvor du angiver placeringen af ​​dine filer.

FC’s syntaks

Som ethvert værktøj i kommandoprompten skal du vide, hvordan du indtaster dine kommandoer med den korrekte syntaks. Der er to hovedmuligheder for værktøjet File Compare, som du kan bruge. Hvis du vil sammenligne to sæt filer i stedet for to individuelle filer, kan du bruge jokertegn (? Og *).

FC [pathname1] [pathname2]

FC [switches] [pathname1] [pathname2]

Afhængigt af din kommando modtager du et af fire% fejlniveau% svar.

  1. -1 – Din syntaks er forkert.
  2. 0 – Begge filer er identiske.
  3. 1 – Filerne er forskellige.
  4. 2 – Mindst en af ​​filerne kan ikke findes.

Lad os øve

Inden vi kommer i gang, skal du downloade vores tre eksempler på tekstdokumenter, som vi vil bruge til testen. Disse dokumenter indeholder hver et stykke tekst med et par lignende ordgrupper. Når du har downloadet disse tre dokumenter, kan du kopiere dem til enhver mappe på din computer. Med henblik på denne vejledning lægger vi alle tekstdokumenterne på skrivebordet.

  1. FC-prøve
  2. FCøvelse
  3. FCøvelse2

Nu skal du åbne et forhøjet kommandopromptvindue. Åbn startmenuen i Windows 7 og 10, eller åbn søgefunktionen i Windows 8, og søg efter CMD. Højreklik derefter på det, og tryk derefter på “Kør som administrator.” Selvom du ikke behøver at åbne et forhøjet kommandopromptvindue, hjælper det dig med at undgå eventuelle irriterende bekræftelsesdialogbokse.

Vores tutorial i dag vil dække flere enkle scenarier, som vil blive uddybet nedenfor.

  1. Sammenlign to tekstfiler i den samme mappe ved hjælp af File Compare.
  2. Sammenlign filer i den samme mappe ved hjælp af File Compare ved hjælp af “/ lbn” -kontakten.
  3. Sammenlign to identiske filer.
  4. Udfør en binær sammenligning af to forskellige filer og to identiske filer.

Scenarie 1 – Sammenlign to tekstfiler ved hjælp af File Compare.

Nu hvor du har dit kommandopromptvindue åbent, og du har dine tekstfiler på dit skrivebord, er vi klar til at lave en simpel filsammenligning. I dette afsnit foretager vi en grundlæggende sammenligning og tilføjer derefter et par forskellige muligheder. Begynd med at indtaste følgende kommando for at sammenligne indholdet af “FCsample” og “FCexercise.” Husk at erstatte stienavnet med det navn, der passer til din computer, og husk, at kommandoprompten ikke er skiftesensibel.

fc C: Brugere Martin Desktop FCsample.txt C: Brugere Martin Desktop FCexercise.txt

I dette tilfælde vises al teksten fra begge dokumenter, fordi de ikke stemmer overens korrekt.

Scenarie 2 – Sammenlign filer i den samme mappe ved hjælp af File Compare ved hjælp af “/ lbn” -kontakten.

Lad os nu prøve en anden sammenligning, hvor vi vil bede FC om at stoppe efter to linjer med uoverensstemmende data. Gør dette ved at tilføje “/ lbn” -kontakten.

fc / lb2 C: Brugere Martin Desktop FCsample.txt C: Brugere Martin Desktop FCexercise.txt

Som du kan se, modtager du en fejlmeddelelse, der siger “Resync mislykkedes. Filer er for forskellige. ” Dette skyldes, at der er mere end to på hinanden følgende linjer med uoverensstemmende data. Prøv at ændre numrene eller redigere filerne selv og leg med værktøjet til sammenligning af filer for at se, hvilke resultater du får.

Scenarie 3 – Sammenlign to identiske filer.

I de filer, du downloadede, vil du se to filer kaldet “FCexercise” og “FCexercise2.” Disse to filer har nøjagtigt det samme indhold, så vi udfører en sammenligning og ser, hvilke resultater vi får.

fc C: Brugere Martin Desktop FCexercise.txt C: Brugere Martin Desktop FCexercise2.txt

Som du kan se på billedet ovenfor rapporterer FC, at der ikke var nogen forskelle. Hvis du skulle redigere en fil, tilføje et enkelt bogstav og prøve kommandoen igen, ville dine resultater vises som på billedet nedenfor. Bemærk, at det eneste, der blev ændret, var tilføjelsen af ​​bogstavet “a.”

Scenarie 4 – Udfør en binær sammenligning af to forskellige filer og to identiske filer.

I dette eksempel udfører vi en binær sammenligning af “FCexercise” og “FCsample” filerne.

fc / b C: Brugere Martin Desktop FCexercise.txt C: Brugere Martin Desktop sample.txt

Du vil bemærke, at funktionen begynder med at informere dig om, at de to filer sammenlignes. Derefter ruller en flok binære cifre forbi, hvor filerne sammenlignes side om side, og til sidst modtager du en rapport, der siger, at FCexercise er længere end FCsample. Til dette næste eksempel udfører vi en binær sammenligning af “FCexercise” og “FCexercise2” filer.

fc / b C: Brugere Martin Desktop FCexercise.txt C: Brugere Martin Desktop FCexercise2.txt

I denne sammenligning af to identiske filer rapporterer FC, at der ikke er nogen forskel mellem de to filer. Nu hvor du kender det grundlæggende i FC-værktøjet, er du velkommen til at lege med afbryderne og teste nogle nye ideer. Husk, at mens du spiller med filer, er det bedst at bruge dummy-prøver som dem, der er angivet her, for at undgå utilsigtet datatab.