                 EQUALISE - A Program to Equalise Folders

What Equalise can do:

Equalise is a Windows 95/98/2000/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 VCL50.zip from any site offering it.  For example:

  www.satsignal.net  =>  Software, Runtime libraries

Extract the file VCL50.BPL 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 
\John, 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

The target may also have command line switches appended, e.g.

    Target:     C:\Utils\Equalise.exe  C:\John  A:  -update


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.


Command-line Switches:

To allow for more automated operation, there are two command line switches that 
Equalise accepts - -update and -new.  These switches are designed to 
automatically answer "Yes" to the questions:

     -update .... automatically replace older files by newer ones

    -newfile .... automatically add non-existant files to a folder

  -newfolder .... automatically add non-existant folders to a tree

These command-line switches must be after the source and destination 
specifications, i.e. as the 3rd, 4th or 5th parameters.

Why are these command-line switches rather than registry entries?  It is to 
allow Equalise to operate in different modes for different situations.


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 available by
e-mail if you register my disk utilities.  To register, contact:

  http://www.satsignal.net  => Software, Register, Disk Tools

The exclusion lists are stored in the registry as comma-separated lists under the 
keys:

  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
  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
1998 Apr 01  V3.2.4   Improve NTFS time comparison to work with adjacent days
1998 Oct 08  V4.0.0   Version for Delphi 4.01
                      Don't skip .RES files to floppy
                      Position form at top of screen
1998 Oct 25  V4.0.2   Allow wide time margin with mixed NTFS/FAT
1998 Oct 28  V4.0.4   Allow running with CD-ROM (no writing, of course!)
                      Shows error messages for non-existant files and folders
1998 Nov 12  V4.1.0   Add -update, -newfolder and -newfile switches
2001 Feb 22  V5.0.0   Version for Delphi 5.01
                      Add About box


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.


Contacting the author:

This program is freeware, and remains copyright of David J Taylor, Edinburgh, 
1994-2002.  This program is provided "as is", without any support.  Whilst I 
cannot answer queries relating to the use of this program, I'd welcome any 
comments or suggestions for improvements you may have, and I would like to thank 
those who have contributed such feedback which has helped mould the present 
version of the program.


Acknowledgements:

David Smith (e-mail: dsmith@wlg.rolle.co.nz) suggested the automation switches


Web site: www.satsignal.net
E-mail: davidtaylor@writeme.com
2002 Feb 23
