File Assess:

File examine is utilised to assess two information against each and every other. After finished, fc returns traces that vary between the two files. If no traces differ, you will receive a information indicating no variances encountered.

Syntax: FC [/A] [/C] [/L] [/LBn] [/N] [/T] [/W] [/nnnn] [drive1:][path1]filename1 [drive2:][path2]filename2
FC /B [drive1:][path1]filename1 [drive2:][path2]filename2


Use of Parameters:

/ADisplays only 1st and last traces for every set of variances.
/BPerforms a binary comparison.
/CDisregards the scenario of letters.
/LCompares files as ASCII text.
/LBnSets the maximum consecutive mismatches to the specified number of strains.
/NDisplays the line figures on an ASCII comparison.
/TDoes not expand tabs to areas.
/WCompresses white space (tabs and areas) for comparison.
/nnnnSpecifies the amount of consecutive traces that should match soon after a mismatch.
[drive1:][path1]filename1Specifies the 1st file or established of files to evaluate.
[drive2:][path2]filename2Specifies the next file or established of files to evaluate.

Illustrations:

Just before we get commenced, you have downloaded the a few files "FCsample, FCexercise & FCexercise2", you can duplicate them into any folder on your pc. For the purposes of this tutorial, we will place all the textual content files on the desktop.

Now you will want to open up an elevated command prompt window. Open up the start off menu in Home windows 7 and 10 or open up the search function in Home windows eight and research for CMD. Up coming, appropriate-click on on it and then press Run as administrator.

Listed here, we will cover numerous basic scenarios which will be elaborated on below.

1. Evaluate two textual content information in the same folder using File Compare:

Now that you have your command prompt window open and you have your text documents on your desktop, we are all set to do a easy file comparison. In this area, we will do a basic comparison, and then include a handful of different choices. Get started by coming into the pursuing command to compare the contents of FCsample and FCexercise.

fc C:\Users\Martin\Desktop\FCsampl 荃灣區迷你倉價錢.txt C:\Users\Martin\Desktop\FCexercise.txt

In earlier mentioned circumstance, all the text from the two paperwork is shown simply because they do not match up appropriately.

two. Evaluate files in the very same folder utilizing File Assess employing the /lbn swap:

Allows try out one more comparison in which we will explain to FC to stop following 2 lines of mismatched information. Do this, by including the /lbn swap.

fc /lb2 C:\Users\Martin\Desktop\FCsample.txt C:\Users\Martin\Desktop\FCexercise.txt

In over, you obtain an mistake information which claims Resync Unsuccessful. Information are way too various. This is due to the fact there are much more than two consecutive lines of mismatched information. Try changing the figures or modifying the documents your self and play with the file examine instrument to see what results you get.

3. Evaluate two equivalent information:

In the information you downloaded, you will see two data files called FCexercise and FCexercise2. These two documents have specifically the same content material, so we will complete a comparison and see what results we get.

fc C:\Users\Martin\Desktop\ FCexercise.txt C:\Users\Martin\Desktop\FCexercise2.txt

In over impression, FC stories that no variations had been encountered. If you have been to edit one file, insert a one letter, and try out the command again, your outcomes would demonstrate up as in the image under. Notice that the only thing that was altered was the addition of the letter a.

four. Carry out a binary comparison of two diverse files and two identical files:

In this case in point, we will be executing a binary comparison of the FCexercise and FCsample data files.

fc /b C:\Users\Martin\Desktop\ FCexercise.txt C:\Users\Martin\Desktop\sample.txt

Then the subsequent case in point, we will be performing a binary comparison of the FCexercise and FCexercise2 information.

fc /b C:\Users\Martin\Desktop\ FCexercise.txt C:\Users\Martin\Desktop\FCexercise2.txt

In this comparison of two identical information, FC reports that there is no difference between the two documents.

荃灣區迷你倉價錢
arrow
arrow
    全站熱搜

    RoryThackerol 發表在 痞客邦 留言(0) 人氣()