@echo off

: This Batch file SHOULD be executed before the UNZIP process

   if not exist xpmail.exe goto end

echo Existing Xpress Setup Detected..........................

   if exist xpmail.exe attrib xpmail.exe -r > nul
   if exist xpadm.exe  attrib xpadm.exe -r  > nul

echo Deleting old files.....Ignore DOS errors or File Not Found messages

   for %%x in (misc\*.*) do del %%x > nul
   for %%x in (help\*.*) do del %%x > nul
   for %%x in (file_id.diz order.frm prices.doc) do del %%x > nul
   for %%x in (register.* features.lst install.doc) do del %%x > nul
   for %%x in (addendum.doc license.doc betateam.doc) do del %%x > nul
   for %%x in (xdslist.doc checkoff.lst install.dat) do del %%x > nul

   if exist pre503\xpmail.prm goto end

echo Backing up some old files in directory PRE503\..............

   md pre503
   md pre503\bull

   if exist xpmail.prm copy xpmail.prm pre503 >nul
   if exist xpress.    copy xpress. pre503 >nul
   if exist xpress.bat copy xpress.bat pre503 >nul

   for %%x in (bull\*.*) do copy %%x pre503\bull > nul
   for %%x in (xpuser.def xmaster.dat xforms.dat) do copy %%x pre503 > nul
   for %%x in (*.key *.ctl services.xp) do copy %%x pre503 > nul
   for %%x in (sxorder.*) do copy %%x pre503 > nul
   for %%x in (internet.*) do copy %%x pre503 > nul
   for %%x in (xplang.ctl xpmenu.ctl) do del %%x > nul

:end
