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 (http://www.vpascal.com), probably the best code generating Pascal compiler for OS/2. DirDiff is freeware.
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.
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:
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 (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 (http://www.subsys.de).
In the picture below you can see the window that appears when you've choosen 'Slaunch' in the popup menu
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"
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 (mailto:w.schmid@ws-it.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.
This article is courtesy of www.os2ezine.com. You can view it online at http://www.os2ezine.com/20010916/page_5.html.