Document comparison tool for Windows2000 secret weapons (i)

Source: Internet
Author: User
Tags command line comparison

One, although the first sight but déjà vu

WinDiff is a tool for comparing files in the Windows2000 support tool. The most notable use of files that are primarily used to compare ASCII is the source code used to compare program files. If you have a file on your a: disk, it was originally copied from the C: disk. For some reason, you suspect that the file on a: disk may have a problem, and if you make sure that the files on the C: Disk are no problem, you can compare the files on the A: disk with the files on the C: Disk with WinDiff. If you are familiar with DOS commands, you must know the comp command or FC command. In fact, WinDiff from the function, is equivalent to the above DOS command, only this is the Windows version and more powerful. So, functionally speaking: Although the tool is the first time, but déjà vu.

Also, like some programs in the support tool, WinDiff can work with both interfaces: The command-line interface and the graphical interface. But there are also differences between the tools that are available in the previous two versions: The graphical interface also appears after the WinDiff is started on the command line. I actually verified that the output is consistent with the Windows working interface.

Command line can be used in the Command Console--cmd window, work under CMD, the main advantage is to occupy the system resources are very few, can adapt to the strict resource constraints of the environment; graphical interface programs can be used directly in Windows2000, both of which are actually the same. Another problem is getting online help, we are very accustomed to the "command/?" approach, with this specificity, in the cmd window, you again like the previous command-line program, with/? To get help, the result is not a character interface.

It's like the screenshot above. Although it is a graphic, but also play an online help role.

Ii. introduction of the command line

WinDiff uses the command line's detailed syntax as follows:

WinDiff path1 [path2] [-d] [-O] [-n name] [-S [Options] savefile] [f [options] comp_savefile]

Parameters and Description:

Path1 path2

The file path to compare.

-D

Comparisons are made only within one directory.

-O

The summary displays the results of the comparison.

-N Name

This parameter is used to issue (compare results) notifications After the file comparison has ended. Name is the filename when the notification is sent with the network.

-S options

To save the options for all file lists, the specific option switches can refer to the following characters:

-S: Compares two files in the same path.

-L: Compares the files in the first path only (the leftmost one).

-R: Compares only the files in the second path (the rightmost one).

-D: Compares two files located in different paths.

SaveFile

Used to specify the name of the file to which the comparison results are written

-F Options

The available options for saving (results) files are as follows:

-I: Saves the same file in two paths.

-L: Save the file only on the path where the first file resides.

-r: Saves the file only in the path where the second file resides.

-F: Saves only left-shift files.

-G: Saves only the right move file.

-S: Only files similar to the left side are saved.

-A: Only files similar to the right are saved.

Here to the left and right refers to the comparison of the two files, such as the comparison of the two files are: filename1 filename2, then filename1 is the left, filename2 is the right.

Comp_savefile

The resulting comparisons need to be saved in a file, SaveFile is the name of the file.

To compare the different items in the results, the background color you can use is selected as follows: The equal sign is the color, and the right is the item that corresponds to the color.

Red background = Left file

Yellow background = Right file

Blue Text = Moved line

Black Text = everything else

Because no matter in the CMD command console or directly in the Windows2000 to start the WinDiff, appear is the graphical interface, so, the following description of the command line section refers to the menu and other nouns are normal. For file comparisons using the WinDiff command line, the main principles to be mastered are:

1. When you call WinDiff, but you do not specify the path path1 path2 of the file that participates in the comparison, you can specify the file or directory to compare by clicking Compare Files or Compare directories from the File menu.

2. Call WinDiff, only the files that are located in the path path1 are clearly indicated. path2 file name is not specified, WinDiff compares files in the current directory with the same name as the file already specified.

3. In imitation of the above, call WinDiff, only clearly pointed out the path1 directory path. Does not specify a path2 directory, WinDiff compares the files in the current directory with the directory files that are already specified.

4. Call WinDiff, which clearly indicates the name and path of the file located in the path path1 and path2, WinDiff will compare the two files.

In the previous step, call WinDiff and explicitly point to the path path1 and path2 directory, WinDiff will compare the files in the two directories.

Because the graphical interface is still displayed after the command line is started, the actual usefulness of these parameters is not significant. To balance the operation of WinDiff from practicality and convenience, we should learn to master the operation of file comparison under the graphical interface. These, we will leave in the next presentation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.