Is your server running slowly? Check with SolarWinds ipMonitor.
Get your free evaluation copy of ipMonitor
here
IPAM will assist
you in managing IP addresses.
To let you into a secret, this utilities is fun to use, even if you
don't have a pressing need to calculate your IP address space.
Get a free evaluation copy of
Orion IPAM
Best Practice Ezine #62 Windiff
Don't you just love utilities with expressive names such as Windiff? The concept behind Microsoft's Windiff is simple, to compare files and display their differences. Again like other tools, the power of Windiff comes from you
imagining scenarios when it would solve your problems.
Topics for Windiff
Judging my postbag, not many people realize the benefits of comparing files with Windiff. However, like the all the best ideas, once you understand it becomes blindingly obvious.
Take the situation where you want to find a particular setting in the registry, for example, a setting on the Winlogon message box that you wish to control. - Before you make any changes, export the registry with Regedit.
- Make the change, for example, reverse the tick in the checkbox
- Export the registry after the change.
- Compare the two .reg files with Windiff.
Incidentally, if you have other killer uses for Windiff, do let me know and I will publish them.
If you are looking for handy network utilities, try some of the free downloads at
Tools4Ever
I find that while Windiff is easy to get working, it leaves me with that lingering feeling that I never quite reach the bottom of its possibilities. For example, I rarely use Windiff for copying files. Windiff
has two main modes:
Windiff has two modes: Compare files Compare directories
Let us start with Windiff's number one job, comparing files.
When you first launch Windiff and seek to compare two files, beware of a tricky menu when Windiff asks for the names of two files in quick succession. I emphasise this sequence because when I was a greenhorn, I thought either
I was going mad, or Windiff had a bug. My salvation was reading the screen, Select First File, then Select Second File - phew it's that easy to get started.
Once you have loaded the two files, I expect you want Windiff to identify the differences. The trick is to click on 1 .\file and then click on Expand.
As ever Microsoft provide two ways of doing everything, and you could click on the Expand Menu and then select, 'Both files'.
At the business end, Windiff homes in on every tiny difference between the two files, moreover for easy reading it highlights each difference. The color coding extends into the margin so you can see which file
corresponds to the red highlight and which to the yellow highlight.
If a line is the same in both files it only has one entry, which you see in normal black text. Where there are differences, not only do you have the exceptions highlighted, but it gives you the line number.
The screen shot is taken from a regedit export. As I mentioned earlier, one of my classic uses of Windiff is finding where in the registry Microsoft store particular settings.
After doing it best to match the files line-by-line, Windiff looks at the remaining parts. Where there are sections which are different, but which correspond, in the sense that the part before and the part after match
between the files, Windiff has a choice between displaying the lines as blocks or as interleaved.
Windiff uses a heuristic intelligence to decide whether the lines from the two files are similar. If it judges that they are similar it displays them interleaved, otherwise it displays them as blocks.
A secondary job for Windiff is to compare whole folders or directories. Just click on the File menu and select 'Select Directories'. This time you see both directories one under the other so there is
no chance of confusion.
Windiff Options
Although there is nothing really exciting in the Options menu, they are worth checking. In addition to the options, check out the Expand menu and decide if you need to add or remove any of those options.
However, if you remove the tick next to 'Show Identical Lines, it will help you track single changes in large files.
Windiff's Mark Menu
It is easy to overlook the Mark menu. The job of this menu is to hide or exclude files in your search.
Windiff Command Line Options
My old friend 'Barking' Eddie insisted that I added this command line section. As I may have mentioned in previous Eddie is an ex-UNIX man and is a founder of 'Dos Diehards'.
Windiff Command Line Options:
-D Compare one directory only. -F[flags] savefile Save composite file to 'savefile'. The 'flags' may consist of one or more of I (identical), L (left), R (right),
F (moved leFt), G (moved riGht), S (Similar left), A (similiAr right), X (exit after saving list). (e.g. -FLF saves list of Left or moved-leFt lines). -I file Reads list of files to compare, from the
specified input file. Each line can contain one or two filenames, space delimited (with quoting, if filenames contain spaces). Use "-" as the filename to read from stdin. If a line contains only one filename,
the file is compared to itself. -N name NET SEND notification to 'name' at end of comparison. -O Outline view (no automatic expansion). -P Perverse comparison: breaks lines on punctuation. -S[flags]
savefile Save list of files to 'savefile'. The 'flags' may consist of one or more of S (same), L (left), R (right), D (different), X (exit after saving list). (e.g. -SLD saves list of Left or Different
files). -T Compare whole subtree.
Windiff is a handy utility for highlighting differences between files. My 'killer' use for Windiff is discovering where menu settings correspond registry values. Another job for Windiff is
checking directories and reporting and differences in the file lists.
Their topics and material are ideal for getting you started with VBScript. The
videos are easy to follow and you can control the pace. Try their free demo material and then see if you want to buy the full package.
See more about VB Script Training CD.
|