At work, I am getting a new computer and will go from Windows 98 to Windows 2000. I use a set of two batch files to keep my office computer synchronized with my home computer.
About a year ago, work tried to upgrade my existing computer to Windows 2000 and I could not get these batch files to work so I got them to reload Windows 98. This time with the new computer that is not an option. Unfortunately, I do not recall the specific problem of why they would not work.
I will show the batch files and briefly describe them and I hope someone can tell me what I need to do to modify them to work under Windows 2000.
I run these batch files on three different computers, one at work and two at home, to keep all three synchronized. Word runs Windows 98 but I have both Windows 95 and ME running at home.
The first batch file uses the command line program PKZIP to zip all the modified files on my D-drive partition to a file on the S-drive:
=====================================================
REM First, it builds a path since Windows ME skips
REM the batch file that I specify as the startup
REM batch file and that one sets the path
PATH;
PATH=C:WINDOWS
PATH=%PATH%;C:WINDOWSCOMMAND
PATH=%PATH%;D:UTILITY
PATH=%PATH%;D:BAT
PATH=%PATH%;D:BATZIP
PATH=%PATH%;D:ZIP
REM Since Firebird uses a different subdirectory for
REM each installation and you cannot specify a new
REM location, I have to have the batch file look for
REM the location on each machine and respond accordingly
ECHO Copying Bookmarks to D-Drive
IF EXIST C:WINDOWSApplic~1MozillaProfilesdefault1hvmp4ry.sltbookmarks.html XCOPY C:WINDOWSApplic~1MozillaProfilesdefault1hvmp4ry.sltbookmarks.html D:Bookmarks*.* /M
IF EXIST C:WINDOWSApplic~1MozillaProfilesdefault0ix988m3.sltbookmarks.html XCOPY C:WINDOWSApplic~1MozillaProfilesdefault0ix988m3.sltbookmarks.html D:Bookmarks*.* /M
IF EXIST C:WINDOWSApplic~1MozillaProfilesdefaulty4mlyg6k.sltbookmarks.html XCOPY C:WINDOWSApplic~1MozillaProfilesdefaulty4mlyg6k.sltbookmarks.html D:Bookmarks*.* /M
REM I only keep data on my D-drive but there are some files I tell PKZIP
REM to skip, mainly for housekeeping reasons
PKZIP -ADD=Incremental -LEVEL=9 -DIR=ROOT S:D-DRIVE D:*.* -EXCLUDE=*.TMP -EXCLUDE=JUNK*.* -EXCLUDE=*.BAK -EXCLUDE=D:RECYCLED*.* -EXCLUDE=D:IMAGE.DAT -EXCLUDE=D:EUDORAATTACH*.* -EXCLUDE=D:_RESTORE*.*
=====================================================
The next batch file copies the changed files from the ZIP file on the S-drive onto the D-drive of the target computer. That is, I run the first batch file at work to archive the files to the S-drive then run this batch file at home to retrieve the changed files. In the morning, I repeat the process.
=====================================================
REM In order to handle deleting or renaming files
REM without my having to remember, I just create a
REM batch file on the S-drive called DOTHIS.BAT. This
REM batch file checks for it and runs it if it finds it.
REM Run DOTHIS.BAT if it exists
REM ===========================
IF EXIST S:DOTHIS.BAT CALL S:DOTHIS.BAT
REM Unzip the files
REM ===============
D:
CD
IF EXIST S:D-DRIVE.ZIP D:ZIPPKZIP S:D-Drive -EXTRACT=Update -DIR=ROOT
REM Copy Bookmarks
REM ==============
IF EXIST C:WINDOWSApplic~1MozillaProfilesdefault1hvmp4ry.slt*.html XCOPY D:BookmarksBookmarks.html C:WINDOWSApplic~1MozillaProfilesdefault1hvmp4ry.slt /M
IF EXIST C:WINDOWSApplic~1MozillaProfilesdefault0ix988m3.slt*.html XCOPY D:BookmarksBookmarks.html C:WINDOWSApplic~1MozillaProfilesdefault0ix988m3.slt /M
IF EXIST C:WINDOWSApplic~1MozillaProfilesdefaulty4mlyg6k.slt*.html XCOPY D:BookmarksBookmarks.html C:WINDOWSApplic~1MozillaProfilesdefaulty4mlyg6k.slt /M
REM I cannot reset the entire drive at once after copying
REM because I have Norton running and it generates an error
REM if I try to reset its hidden subdirectory so I must process
REM the subdirectories one-at-a-time
REM Reset the archive bits if requested
REM ===================================
ECHO Resetting Archive Bits, This May Take A Few Moments
ATTRIB -A D:ACCESS*.* /S
ATTRIB -A D:ARC*.* /S
ATTRIB -A D:BAT*.* /S
ATTRIB -A D:BOOKMARKS*.* /S
ATTRIB -A D:BOOKS*.* /S
ATTRIB -A D:CICINDA*.* /S
ATTRIB -A D:COMMON*.* /S
ATTRIB -A D:DISCARD*.* /S
ATTRIB -A D:DICTIONARY*.* /S
ATTRIB -A D:ECONOM~1*.* /S
ATTRIB -A D:EUDORA*.* /S
ATTRIB -A D:HOMEPAGE*.* /S
ATTRIB -A D:LETTERS*.* /S
ATTRIB -A D:MONEY*.* /S
ATTRIB -A D:MP3*.* /S
ATTRIB -A D:NOTES*.* /S
ATTRIB -A D:PERSONAL*.* /S
ATTRIB -A D:RESEARCH*.* /S
ATTRIB -A D:TEACHING*.* /S
ATTRIB -A D:TEMPLATES*.*/S
ATTRIB -A D:UTILITY*.* /S
ATTRIB -A D:ZIP*.* /S
=====================================================
The batch files have more housekeeping chores, such as deleting an archive file after it has been used but these are the main commands. Any hints are appreciated.
Ronny