                 EQUALISE - A Program to Equalise Folders

What Equalise can do

Equalise is a Windows 95/NT4 program, written to synchronise folder structures 
on two different computers over a network, or between a computer and a floppy 
disk.  It can be used to keep up-to-date safety copies of files on floppy 
disks, or to allow program development on two different computers - perhaps 
one at work and one at home.


Installing Equalise

Simply extract the file Equalise.exe from the Zip archive to a folder of your 
choice such as C:\Utils.  Only the .EXE file is needed, the other files are 
only required to re-compile Equalise.  Then create a shortcut to Equalise to 
control how it will work for you.

If you don't already have Borland's run-time library, you will also need to 
download the file VCL30.zip from any site offering it.  For example:
  http://www.user.globalnet.co.uk/~hermes02/Freeware/VCL30.zip
Extract the file VCL30.DPL from this archive and copy to your Windows System
folder (e.g. \Windows\System or \WinNT\System32).  

The program takes two command-line parameters, a disk & folder specification, 
and a disk drive letter.  For example, to equalise your data on drive C:, in 
folder \Davids, to a floppy disk in drive A:, create a new shortcut with the 
following properties (assuming Equalise has been copied to C:\Utils):

Target:     C:\Utils\Equalise.exe  C:\John  A:
Start in:   C:\Utils


How Equalise Works

Equalise scans down the folder tree specified by the first parameter, and 
ensures that a similar directory tree is created in the destination drive.  
Source and destination drives are then swapped and the process repeated.  
Within each folder, the files present are compared.  If the files' time-stamps 
differ, Equalise offers to copy the more recent file to the older.  If the 
file does not exist in the destination, Equalise offers to create it.  If the 
destination folder does not exist, Equalise also offers to create it.  
Equalise will not try and create copies of backup or temporary files that 
could easily be re-created.  A list is given later.

Equalise ignores folders that contain private information, or information that 
can easily be regenerated.  As supplied, Microsoft FrontPage folders (those 
starting \_VTI_) are skipped.

Before you run Equalise for the first time, it's probably easier to use Windows 
Explorer, File Manager or xcopy to create the slave network or floppy folder 
and files.  As I am trying to equalise more than one floppy's worth of data 
between two machines, I have created several "transfer" floppies, but 
restricted each floppy to one particular purpose by restricting the folders on 
each floppy, so I have one with \Davids\Word, one with \Davids\PowerPoint, one 
with \Davids\Excel since this suits my way of working.  You may be organised 
more on a project basis and may prefer \Project1\Reports, \Project2\Memos or 
whatever.


Using Floppy Drives

The way that Equalise operates depends on the media involved - floppies are 
assumed to have limited capacity.  This has two implications, folders will not 
be created if they don't already exist, and certain files will not be 
automatically created if they do not already exist (for example, backup files 
or object files that could easily be re-created by re-compiling the source).  
A complete list of excluded files is given later.

Note that if the file does already exist in the destination, because you've 
explicitly put it there, its status is checked and the file is updated if 
required.


For Your Information

The program was originally written in Turbo Pascal, has gone via Microsoft's 
Visual C++, and is now in Borland's Delphi.  The source code is included in 
the Zip file, but if you do make any changes please let me know so that others 
may also benefit.  The exclusion lists are stored in the registry as comma-
separated lists under the key:

  HKCU\Software\David J Taylor\Equalise\DontCopyFolder
  HKCU\Software\David J Taylor\Equalise\DontCopyAtAll
  HKCU\Software\David J Taylor\Equalise\DontCopyToFloppy

I welcome any suggestions you may have to improve Equalise.


Folders Excluded

The decision to exclude a folder is made on the basis of any part of the folder 
name matching the specified string.

\_VTI_   Folders used by MS FrontPage for private data

Files Excluded in Normal Mode

The decision to exclude files is made on the basis of the leading characters in 
the file extension, the content is not examined.

APS   VC++ binary resources for quick loading
BAK   backup files
DSK   Delphi desktop image
DSM   Delphi symbol files
IDB   more symbol tables?
LDB   MS Access locks
MOZ   Netscape cache files
PCH   VC++ pre-compiled headers
PDB   VC++ program database
SBR   VC++ browser files
VCP   VC++ project data
WBK   Word 95 backups
~     backup and temp files


Files Excluded in Floppy Mode

The decision to exclude files is made on the basis of the leading characters in 
the file extension, the content is not examined.  

APS   Visual C++ App Studio compiled resources
BAK   backup files
BIN   general binary files
BSC   Visual C++ source browser files
DCU   Delphi compiled unit
DLL   dynamic link libraries
DSK   desktop image
EXE   executable files
LDB   Access lock files
OBJ   object files
OBR   Borland C++ object browser files
PCH   pre-compiled header files
PDB   Visual C++ program debug database
PIC   pictures
RES   compiled resources files
RWS   resource workshop pre-compiled
SBR   Visual C++ debug browser information
TGA   Targa graphics files
TPP   Borland Pascal protected-mode units
TPU   Borland Pascal real-mode units
TPW   Borland Pascal Windows-mode units
VCW   Visual C++ make status
WAV   sound files
WSP   Visual C++ workspace image
~     backup and temp files
001, 002, 003, 004   old versions of various files


Known Problems

* Under exceptional circumstances, it is possible for the program to be 
interrupted in the middle of copying a file.  If this happens, the older 
destination file may have zero size on the destination disk, or may have a 
time-stamp equal to the current time, rather than the time-stamp of either the 
original or the source file.  In this case, you must manually delete the 
erroneous destination file and either re-run Equalise or copy the file 
manually.  If you do not, the "newer" zero-length file will be copied back 
over the correct original file the next time that Equalise is run. 


Revision history

1994 Dec 17  V2.0     First C++ version
1997 Mar 16  V3.0.0   Use SHFileOperation of Windows 95 and NT 4.0
                      Version for Borland's Delphi 2.01
                      Use registry entries to store comma strings
                      Allow spaces in folder names
1997 Apr 20  V3.0.2   Add .NCB as don't copy type (Visual C++/J++ parser info)
1997 May 08  V3.1.0   Version for Delphi 3.0
1997 Sep 23  V3.1.2   Ensure display is synchronised with current directory
                      Allow breaking out of large list of files in one directory
1997 Nov 15  V3.2.0   Add IgnoreFolders list - for FrontPage *\_vti_*
                      Handle mixed summer time & winter time on mixed NTFS & FAT
1998 Mar 22  V3.2.2   Version for Delphi 3.02
                      Position form higher, so active folder is visible


Caveat

This program is provided on an "as-is" basis as an unsupported utility.  It is 
not a formal software tool, and may be updated without notice, although no 
major changes are anticipated.  No responsibilities will be accepted for its 
use, or for any loss of data or other damage sustained as a result.  It is up 
to the user to confirm the suitability of this program for their intended 
purpose.  Nevertheless, the program has been in daily use for equalising between 
a networked computer and a floppy disk, between a floppy disk and a non-
networked computer, and between two networked computers.


david.taylor@gecm.com
1998 March 22
