Contents
Windows Directory Compare

Version 0.9

Pat Beirne

Overview

Screen

Single Directory View

Double Directory View

Keyboard

Drag and Drop

Copying Files

Typical Usage

Versions


Overview

This little program allows you to view the contents of one or two directories, allows file copy between them, and works with the Windows FileManager to support the creation and copy of 4DOS file descriptions.


Screen Layout
The Screen

When the program wakes up, you should see:

Single directory mode:

    file name           file size & date & time     80 character of descriptive comment

or double directory mode:

   file name      size/date in source                size and date in dest    80 characters of description

When a files exists in both directories, the little >=< symbol in the middle indicates whether the file on the left (the source) is newer, the same as, or older than the file on the right (the destination).


Usage, Single Directory View

Click the 2-dir button off.

The directory list fills with the names of all the files. The list can be sorted by name, size or date, by pushing the appropriate sort-by button.

To create or modify a file description, select the appropriate file by mouse or arrow-key. Then if you type any alpha-numeric key, you will put that key in the description box.

Normal editting works here, including home, end, backspace, delete and Ctrl-X/C/V (cut,copy,paste).

To work on the description for another file, simply hit up,dn,pgup or pgdn key.

For those of you in the know, an edit box appears in response to the first alpha key stroke, and disappears when a up,dn,pgup or pgdn key is pressed.

To save the descriptions to disk, hit Exit. Your choice of file sort order is saved as well. To discard the descriptions, hit Quit. You can also close from the system menu, which will save your

descriptions, but not your sort preference.

In single directory mode, the destination drive & dir, the Clear and the Filter buttons do nothing. The Flip button swaps source and destination directories.

If you double click on a file name, you will execute that file, according to the FileManager associations. See the discussions on the <Enter> key, below.

In this mode, the program works similarly to WDN and DESCRIBE. All the file descriptions should be compatible with 4DOS, NDOS, DESCRIBE and most of the 4DOS add-ons.


Double directory view
Usage, Double Directory View

Click the 2-dir button on.

The directory list fills with a double list of files, including files from both the left (source) and right (destination) directories. The files are sorted according to the current setting of the sort-by

buttons, and filtered according to the filter buttons.

If a file name exists in both directories, the file list shows the entry as in the first three lines above, depending on the date stamps of the files. In the first case, the file on the left (the source) is more recent than the file on the right (the destination). It is also shown selected. On the second line, the right hand file is more recent. On the third line, the files have the same time and date.

If the file exists only in the destination, the entry is shown as on the fourth line. If the file exists in only the source directory, the entry is shown as on the fifth line. This line is also shown selected.

The descriptions shown for the files come from both directories. When the description exists in both directories, the source directory takes precedence.

Sorting

The files may be sorted by name, date or size. For date and size, the source directory date and size takes precedence.

Filtering

You may ask to see all files. Or you may wish to see only the differences. In this case, files that have the same name and date will be hidden, so you can concentrate on the differences. Or you may wish to see similar files. In this latter case, you willsee only files that have the same name in both directories. This mode is great for refreshing floppies in a sneakernet arrangement. [I use this mode to shuttle files from work-to-home-to-work.]

Selecting Files

Any change of path, sort-by or filtering mode will auto select files. The selection picks files that are newer in the source, or not present in the destination. With the filter set to All, if you copy all the auto-selected files, then the destination directory will become identical to the source.

You may find the auto-selected file list a bit too crowded in many cases. Try using the Diffs or Similar filter setting to reduce the quantity. Or hit the Clear button to perform manual selection.

File selection can be toggled by clicking with the mouse, or hitting the space bar when on top of a file name.

Note: The space bar is also used in the creation of file descriptions. To distinguish between the uses of the space bar, it is decreed that the first character of a file description cannot be a space. If you are at the beginning of a file description, the space bar is interpreted as a file-select toggle.


Keyboard
The Keyboard

The tab key works. The tab order is:

source drive & dir

destination drive & dir

file selector

Exit, Quit, Clear

Copy, Flip, 2-Dir

sort-by (tab-group)

filter (tab-group)

The activation of most of the push buttons will jump the focus to the file selection box.

To select a drive, use the Alt-S (or Alt-T) key to get to the drive box, and hit the key that corresponds to the drive, such as 'c'. To control the directory box, Tab to it, use the arrows to select the directory, and hit the <Enter> key.

Because the source drive is changed so often, there is a quick way to change drives: use the Ctrl-A thru Ctrl-Z keys to select drives A thru Z

If you hit <Enter> when the focus is on a file name, you will execute that file, according to the FileManager associations. For example, if you hit <Enter> when the focus is on a file called "README.TXT", you will wake up the NOTEPAD.EXE with the file README.TXT.

If the program is in 2-dir mode, and the current selection shows two files, the <Enter> key works differently. I interpet the fact that you have picked a 'pair of files' to mean that you wish to compare the two files. A file comparison program is started, to compare the left and right versions of the file. The default compare program is FC.EXE, which comes with DOS, but you may use any compare program by adding a line to the WDRM2.INI file, of the form:

CompareFunction=c:\winapps\match.exe %s %s

The phrase 'CompareFunction='must be exact. On the right of the equal sign, include the name of any file-compare program that can take two file names. Use the %s symbols to indicate how the file names should be inserted. Some popular programs are FC.EXE by Mike Albert and MATCH.EXE by Barry Press.

Summary:	Alt-A	All files

Alt-B	Sort by file extension

Alt-C	Copy selected source files to dest

Alt-D	Sort by date

Alt-E	Clear the selctions

Alt-F	Flip source and destination

Alt-I	Different files only

Alt-N	Sort by name

Alt-Q	Quit; don't save descriptions

Alt-R	Similar files only

Alt-S	Source drive selection

Alt-T	Dest drive selection

Alt-X	Exit; save descriptions

Alt-Z	Sort by size

Alt-2	Double directory list (aka directory compare)

Space	Select file (only when the focus is in the file list box)

Esc	Quit; same as Alt-Q

Ctrl-A thru Z	Switch source to drive A thru Z


Drag and Drop

WDRM2 is compatible with the Win3.1 File Manager drag and drop. It allows you to copy files, including their 4DOS descriptions.

If the program gets a file or group of files dropped on it, it tries to do something sensible.

Mode	Where Dropped	Action

any	source dir	change the source directory

any	dest dir 	change the destination dir; auto switch to

2-dir mode

1-dir	elsewhere	use the dropped dir as source

autoselect the dropped files

if dropped dir is the same as what's already

shown, stay in 1-dir mode

(only the first dropped file selected)

if dropped dir is different, switch to

2-dir mode, and move the old source dir

to the dest

WDRM2 COMES TO TOP.

2-dir	elsewhere	replace the old source dir with the dropped

dir; auto select the dropped files

[The reason here is: you have been using

a 'destination' directory, probably for some

kind of archive usage. Therefore, the dest.

directory is maintained.]

WDRM2 COMES TO TOP.

If a directory is dropped in any of the above cases, no files are auto-selected.

You can drop files on the program when it is in the iconic state. The action is the same as in the 'elsewhere' case above.

When you drop on the 'elsewhere' case, the program itself becomes the topmost window. You can then check your selection, and Copy the files to the destination. Note that the Copy will move the file descriptions to the destination along with the files.

If you are using a drag-n-drop program launcher, such as WinDrop, DROPPER or WINDOCK, you may start up WDRM2 by dropping a file or directory on the launch button. The launch manager will start up WDRM2 and pass the file/directory name in on the command line. The program will start up in the appropriate directory, with the appropriate file selected.

To summarize, there are three drop-sensitive areas in WDRM2: the source directory, the destination directory, and the 'rest'. Drops will change the source directory, the destination directory, or the selected files list.


Copying Files

(2-dir mode only)

When the Copy button is pressed, any selected files are copied from the source directory to the destination directory. After each one is copied, the time and date stamps are set to match the source. After all the files are moved, the descriptions are copied into the destination.

As the files are copied, the main directory selections are removed, so you can see the progress.


Typical Usage

Annotating Files

You have some files you want to describe.

1. From the FileManager

Pick up the file and drop it on WDRM2; the window will open up with the file selected, ready for you to type the description.

It doesn't matter whether the program is running open, iconic or resting in a launch manager.

2. From the Program Manager

Double click on the WDRM2 icon, and change the source drive and directory to the directory of interest.

Remember to Exit the program to save the descriptions. You can force a save by changing either the source or destination directories.

You have a collection of files that you wish to annotate. The files have associations*.

1. From WDRM2

Use the source directory to select the directory of interest. Make sure the 2-dir button is off.

Select each file you are interested in. Double click on it, or hit Enter. The file or its association will be launched. Examine the result & close it. This will return you to WDRM2, ready to type the file description.

*File associations are set in the FileManager. For example, .BMP files can be associated with the PaintBrush program. One of my favorite association is to bind .ZIP, .LZH, .ZOO and .ARC files to a zip manager like SHEZ or WINZIP. With these associations,I can double click on a .ZIP file from WDRM2, examine the zip contents, and return to WDRM2 to write the descriptive comment.

Copying Files

You have some specific files you want to copy.

1. From the FileManager

Pick the files of interest and drop them on WDRM2.

If you dropped the files on a program launcher (like WinDrop, DROPPER or WINDOCK), WDRM2 will wake up with those files selected. Go to the destination drive and directory to select the destination, and click on Copy.

If you dropped the files on a WDRM2 that was running (open or iconic), the old destination directory is preserved, and the files you chose are displayed and selected. Simply click on Copy to confirm the copy.

You may change the file descriptions before the copy.

2. From WDRM2

Use the source and destination directory boxes to select the directories of interest. Click the Clear button to remove all selections. Click on the file names that you wish to copy. Click on Copy.

You want to make one directory a mirror of another.

1. From WDRM2

Use the source and destination directory boxes to select the directories of interest.

Select the All filter button if you wish to copy all the changed files from source to destination. The display will also show the unchanged files. If you find the display too crowded, hit the Diffs button, which will remove the unchanged files. In both cases, hit the Copy button to copy over the files.

You want to freshen the files in one direcotry, using the files in another

1. From WDRM2

Use the source and destination direcotry boxes to select the directories of interest.

Select the Similar filter button to only show files that exist in both directories. (You might also click on the sort ByDate button, which bring changes to the top). Confirm that the changed files are the ones you want, and click on the Copy button.

For all of the above, you can get a quick change on the source drive by using the Ctrl-A thru Ctrl-Z keys. You can also get a quick change of source or destination drive & directory by dropping FileManager files/directories on top of the source or destination directory boxes.


Versions and warnings
Versions

Version 0.9

Added 'sort by extension'

Date and time formats are read from WIN.INI [intl]; this makes the screen shots in this .hlp file slightly incorrect.

Close help file on exit

Add browse button to help file

(Many thanks to Dieter Prifling, the author of WinDrop for his suggestions).

Version 0.8

Fixed a problem with file copy to a full disk

Added dest-disk free space check before file copy.

Added 'file-size-not-equal' to the <=> collection.

Change caption line during launch/compare; feedback for the user.

Version 0.7

Fix a problem with removable drive 'disk missing' error

Minor internal changes; use the LBS_WANTKEYBOARDINPUT feature

Hide the selection count when in single-dir mode

Version 0.6

Change the drive and directory boxes to look and feel like the Win3.1 file open box

Drives now show volume names.

Fixed selection count so it tracks better.

Changed the disk copy yield code to let other apps run better. Most WDRM2 keys will abort a copy.

Version 0.5

Fixed minor bug with directory status begin corrupted by button pushes

Added Ctrl-A thru Ctrl-Z for fast selection of source drive.

Version 0.4

Keyboard interface:

Added file execution by hitting <Enter>.

The default push button has been removed.

Directory selection changed from <space> to <Enter>.

<Escape> key quits.

WDRM2.INI

Keeps user preferences. Here are the only options:

[DirNotes2]

CompareFunction=match %s %s

Sort=ByDate	or	Sort=ByName	or	Sort=BySize

Filter=All	or 	Filter=Diffs	or 	Filter=Similar

Internal:

Restore the starting drive & path after every list fill.

Disable buttons that are not used in 1-dir view.

Version 0.3

First evaluations sent out

Limitations

Hidden files are not shown.

File copy is slow.

If the copy destination fills, your files and descriptions will be lost.

WARNINGS

WDRM2 is sent out for comments only; use at your own risk.

File copies are not guaranteed, and file descriptions are sometimes lost.

Bugs and constructive feed back appreciated.

     Pat Beirne

     patb@corel.ca

     CServe: 76475,3640

Plans:

     add better looking buttons, with pictures

     add owner draw stuff to the directory and drive, so we can

          see things like volume names, and network drives

     add more preferences like user fonts

     speed up file copy