System management tip . . . by Bitzen Beitzmann
REPLACE helps synchronize off-line directories
A helpful tool in managing files on your office computer, your home computer, and your portable is the REPLACE command found in version
6 or later of DOS. Suppose you have a directory with the same
name1 on each computer's fixed
disk2, and that you want to be able to work on any file in that directory on any computer.
Using a diskette3 for communication, you can prepare a batch procedure
DIRSYNC.BAT
REPLACE %1\*.* %2 /A (add new files)
REPLACE %1\*.* %2 /U (replace if later date)
REPLACE %2\*.* %1 /A (do in
REPLACE %2\*.* %1 /U both directions)
Now if you execute
DIRSYNC A:\INCLUDE C:\INCLUDE
on one computer, carry the diskette3 to another computer, execute the same command on the
second computer, and later repeat the process on he first computer, the two
INCLUDE directories will then both contain
the current versions of each file. As a bonus, the
diskette2 will serve as a full backup
to both.
To make the procedure more foolproof4, you can
CALL DIRSYNC
from another batch procedure that knows the names of the directories you routinely
want to synchronize.
Of course, this works only if you're a single user observing the disciplne of not
updating the same file on two different machines without an intervening
DIRSYNC. It also doesn't take care of file
deletions (they'll keep coming back!), but you can build a more elaborate
procedure that does.
|