Yahoo

 

Home

Journal Contents List

Next Article Number 6

 

 Internal Links

 

 

USEFUL HIDDEN MICROSOFT TOOLS

No.2 - WINDIFF

by Brian Grainger: email.gif (183 bytes)brian@grainger1.freeserve.co.uk


Windiff is a tool that comes with the Windows 98 Resource Kit and can be found on the Windows 98 CD. However, I see no reason why it should not work with Windows 95 so this article is relevant to users of both operating systems.

Back in the days of the paper newsletter I wrote a series called DOS DROPPINGS. This was quite popular at the time and in it I introduced some of the more esoteric and useful DOS commands. As an aside it is interesting to note that 'Connected', the IT supplement in the Daily Telegraph, has just got round to discussing basic DOS commands. You may not like DOS but it cannot be ignored! Anyway, back to the plot. In my series I discussed, (Vol.19 No.1 Jan/Feb 1997), the command FC, which was introduced with DOS 5. FC is an abbreviation of file compare and its function was, not surprisingly, to compare two files! It told you either that the files matched or, if they didn't, gave you a list of the differences. In my article I mentioned that I used FC to compare system files, such as win.ini and system.ini, before and after installing new software. I could also use FC to see what files had been added/deleted/amended by a software installation. This necessitated doing a directory listing to a file before and after the installation. FC was then used to compare the two files. At the time I thought to myself that it was strange I had to use a DOS command to perform a very useful function concerned with Windows and I wondered why a Windows version did not exist. Presumably, I was not the only one who thought this way because Windiff is the Windows equivalent of FC and a whole lot more.

For those of you who want to use Windiff you will find it in the \tools\reskit\file folder of your Windows 98 CD-ROM. Simply copy the following three files to a suitable folder on your hard drive:

Windiff.exe
Windiff.hlp
Gutils.dll

You can run Windiff from within Windows by running the windiff.exe file. You can also run Windiff from the command prompt (DOS) but I am not going to dwell on that here.

When run Windiff it displays a blank window with a simple menu bar. There is nothing fancy about this program - no tool bars. The File menu has the two entries; Compare Files, Compare Directories. Choosing Compare Files will display the usual Open dialog box to select the first file and then having selected a file the process is repeated for the second file. No such finery when comparing directories. You are given a single dialog box to enter the first and second directories. There is no browse option. Consequently you have to remember and type out the directory names in the curious 8.3 format. Long directory names are not allowed. Clearly this part of the program is not finished! You can select whether subdirectories are also scanned. Having told it what to compare Windiff goes away and does the comparison.

The result displays in the previously blank window. By default it is in Outline mode, which will display the combined list of files and tell you whether they exist only in the first directory, only in the second directory or are different. By default identical files are not listed. It will also warn you if it cannot read a file.

Having got the list of files you can highlight one of them and click the Expand button. The display changes to Expand mode and by default the combined contents of the files being compared are shown with use of colour striping to show lines unique to one or other of the files. You can return to Outline mode by clicking a button which enables a highly interactive means of checking multiple files.

I think it is fairly obvious from the above description, together with the knowledge that Outline mode views can be saved to file that this utility performs all that the DOS command FC did. However, Windiff has added functionality.

  1. The Save file list option will also save checksums of the files which can help in configuration control situations.
    A copy files menu option exists, which can aid in a process of synchronising two directories.
    The Print option can be used to print any screen displayed.
  2. The Edit menu gives the option to edit either of the compared files or its composite. The choice of editor is yours - Notepad is the default. This functionality can be useful in a program development environment.
  3. The Expand menu gives you control on what is displayed in Expand mode. Either of or both the compared files can be on view.
  4. The Options menu gives you control over what is displayed in Outline mode so that you can display any combination of:
    Show files in first directory only
    Show files in second directory only
    Show different files
    Show identical files
  5. The Mark menu allows you to mark files in the lists and hide them. This can be used if there are a group of files you do not care about or perhaps to hide the files as you check out the changes of each in the list.

I think you can see that this little utility has a lot going for it. Its bad points are that it is a bit rough at the edges, (e.g. Compare Directories dialog box). To be fair, it did not cost anything. I think this is a case where the product is worth more than the price!


What's New at ICPUG

Home

Back to Top

Next - Article Number 6

Journal Contents