OS/2 eZine - http://www.os2ezine.com
Spacer
16 September 2001
 
John Bijnens is a CAM/CAM engineer in the KHLim - Dep. IWT which is some kind of technical university in Belgium. He gives training in Pro/E and also writes CNC postprocessors (all development is done on OS/2.)

If you have a comment about the content of this article, please feel free to vent in the OS/2 eZine discussion forums.

There is also a Printer Friendly version of this page.

Spacer
Previous Article
Home
Next Article


Check out the Mesa/2 at http://www.sundialsystems.com/mesaos2ezine


DirDiff - Directory Comparison

Introduction

How often have you wished there was a convenient way to examine whether the contents of two directories was the same e.g. when you wanted to compare the installation directories of the software you have installed on two PC's, or you wanted to know what the difference between those two source trees was, or you were wondering what's the difference between those two versions of a web site.

There are several ways to accomplish this. One of them is a very handy software package, DirDiff. It has a graphical user interface but can also be run from the command line.

DirDiff is developed by Wolfram Schmid. It is native OS/2, written in Pascal and compiled by Virtual Pascal, probably the best code generating Pascal compiler for OS/2. DirDiff is freeware.


Installation

The latest version at this moment is 1.06 You can download it from the author's home page http://www.ws-it.de/en/product/ddiff. DirDiff is available as a zip-file (DDiff106.zip) or as a Warp-IN archive (DDiff106.wpi).

Installation using the WARP-IN archive

You must have Warp-IN installed before you can use to install DDiff106.wpi. Warp-IN is an alternative software installer developed by the people of Netlabs. You can learn more about it at the Warp-IN homepage at Netlabs where you can also download it When Warp-IN is installed, open the folder with DDiff106.wpi and simply double click on its icon to install it.

icon Warp-IN archive

Installation using the zip-file

Make a directory where you want DirDiff to install in e.g.

E:\Bin\DirDiff

Now unzip DDiff106.zip into this directory. You see the following files

You can now create a program object DDiff (e.g. by using the New Program template that can be found in the folder Programs) and place it somewhere on your desktop.

Using the GUI

When you have started DDiff you'll see the following window:

Pressing this button shows a listbox that gives an overview of the different directories you've entered during this session of DirDiff. This overview is not saved when you leave the program.

Pressing this button opens a dialog window that lets you select the directory you want to compare. If you're wondering why nothing happens when you've specified the directories : you can start the comparison by clicking with the mouse in the entry field of 'Path 1' or 'Path 2' so that the cursors blinks in the entry field and then pressing the enter key. Another way to start the comparison is to select the menu option 'File - Rediff'

You can limit the comparison to the files and/or directories you want by specifying a combination of the 'Include file/dir filters' and 'Exclude file/dir filters'. You can specify multiple filters by separating them with a space, e.g.

*.tap *.rar

If you don't want these entry fields to be displayed, you can uncheck the menu options 'Show include filters' and/or 'Show exclude filters' which can be found under the menu 'View'.

When the comparison is done, files that are equal in the two directories are shown with a green text color. You can leave the equal files out of the display by unchecking the menu option 'Show equal file' which can be found under the menu 'View'.

If you place the mouse cursor within the DirDiff window and press the right mouse button a popup menu will appear:

PMDiff

By default the option 'PMDiff' starts the program PMDiff from Araxis. PMDiff is a program that will perform a graphical comparison between two text files. Sadly enough, development is discontinued. Since April 2001 Araxis has removed it from its web pages and stopped selling it. If you want to try it you can still find a copy on Hobbes. [Ed. Although this is restricted shareware, it is still a very useful tool.]

User exec This lets you start an arbitrary program that you've specified in the settings. In the paragraph below about the 'Settings' menu we'll explain how you can do this.
Cmd line A command window is opened and you're placed in the directory specified by Path 1 or Path 2 depending on which half you have clicked.
Original This opens the folder of the directory specified by Path 1 or Path 2 depending on which half you have clicked.
Delete Lets you delete the file you've selected.

The 'Settings' menu lets you specify whether you want to perform a binary compare or if subdirectories should be included in the comparison.

When you select the menu option 'Exec settings ...' the following dialog window appears. This dialog window lets you alter the behavior of the popup menu we've discussed above.

If you press the 'Title' buttons you can alter the name of the corresponding items in the popup menu. If you place a ~ for a letter then this letter will be the items shortcut key.

As I don't like PMDiff (it is a little bit too graphical and therefore not convenient enough for me) I've switched PMDiff for CompDeux. CompDeux is another very fine native OS/2 package that allows you to compare text files and more particular program source files. You can find more information about CompDeux on the author's web site http://world.std.com/~jdveale.

If you specify SmartLaunch as the 'user exec' you can open any file with the appropriate application e.g. a .lwp file with WordPro, a text file with the Enhanced Editor, ...

You can find more information about SmartLaunch on the author's web site http://www.subsys.de.

In the picture below you can see the window that appears when you've choosen 'Slaunch' in the popup menu

Using the Command Line

The Warp-IN installation of DirDiff doesn't make any changes to your config.sys so it isn't included in your PATH. In order to use DirDiff from the command line, you have to add the directory it is installed in to the PATH variable in your config.sys or you must specify the full path when using it. The syntax of 'ddiff.exe' is

ddiff [Path1] [Path2] [/fFilter]

So if you would like to run a comparison between 'd:\project\postprocessor_C37.1' and 'd:\project\postprocessor_C37.1b' you can do this by entering

ddiff d:\project\postprocessor_C37.1 d:\project\postprocessor_C37.1b

If you would like to limit the comparison to files with the extension .c and .tap you can do this by entering

ddiff d:\project\postprocessor_C37.1 d:\project\postprocessor_C37.1b /f"*.c *.tap"

Where DirDiff can be found and Additional information

As mentioned before you can download DirDiff from the author's site http://www.ws-it.de/en/product/ddiff. It is written by Wolfran Schmid who has programmed some other fine software packages. Among them:

PTime/2 This is an OS/2 program for recording and evaluating project times. With PTime/2 you are able to record the time needed for projects or orders fast and easy.
TxtSplit This helps with the creation of multi language texts. You write the different translation versions in a single source le source file and 'split' these then automatically up into the multi language texts. Usable for all text files, e.g. HTML source files. Help texts such as IPF or various other texts.
H2Unit This reads preprocessor #DEFINE definitions out of a C header file (.H) and creates a Pascal Unit (.PAS) with corresponding constants.

You can contact Wolfram at w.schmid@ws-it.de.

Warp-IN

Warp-IN is developed by the people of the OS/2 Netlabs and is intended to become the new general-purpose installer for OS/2 to overcome the current lack of a both flexible and user-friendly installer. You can find more information about this new software installer at http://warpin.netlabs.org.

CompDeux

This is native OS/2 software to compare text files and/or program source files. It is developed by James Davis Veal. You can reach him at jdveale@world.std.com. More information about CompDeux can be found on http://world.std.com/~jdveale.

SmartLaunch

This is a file launcher which allows you to open files based on their associations. It is developed by Frank Wochatz. You can reach him at mail@subsys.de. More information about SLaunch can be found on http://www.subsys.de.

Don't forget that all this software is written by the author in his own spare time so if you like this software, please send a sign of life and your appreciation to him. This way he knows his work is valued very much and it will give a stimulation to develop new versions.

If anything isn't working as expected, don't start to yell but try to provide the author with a full reproducible error report so he is able to correct the problem in case of a bug.

And then

And then it is up to you. Give DirDiff a try.

Previous Article
Home
Next Article

Copyright (C) 2001. All Rights Reserved.