All pastes #625276 Raw Edit

R4win

public text v1 · immutable
·published 2007-07-18 21:04 UTC
rendered paste body
@echo off
:Start
echo ===============================================================================
echo º                         É==============================»                    º
echo º                         º        R4Win Exchange        º                    º
echo.º                         È==============================¼                    º
echo.º ============================================================================º
echo.º                                                                             º
echo º                         [1]    Backup to LaCie                              º
echo º                         [2]    Restore from LaCie                           º
echo º                         [3]    Exit menu system                             º                                                                      
echo ===============================================================================
choice /c:123                            Enter option
echo ===============================================================================


if errorlevel 3 goto Exit
if errorlevel 2 goto LocateRes
if errorlevel 1 goto LocateBak


:LocateBak
for %%i in ( a b c d e f g h i h k l m n o p q r s t u v w x y z ) do (
if Exist %letter%:\asset.flg set lacie=%i%: )
if Exist %lacie% goto Backup
if not Exist %lacie%\asset.flg goto Manual

:LocateRes
if Exist e:\asset.flg set lacie=E:
if Exist z:\asset.flg set lacie=Z:
if exist %lacie% goto Restore
if not Exist %lacie%\asset.flg goto Manual


:Backup
mkdir %lacie%\Lighthouse_DB
mkdir %lacie%\Remacs_DB
mkdir %lacie%\Sysback
mkdir %lacie%\Docs
copy "c:\Program Files\ReMACS\DB" %lacie%\Remacs_DB
copy "c:\Documents and Settings\bagelnet\My Documents" %lacie%\Docs
copy c:\SYS_BACK %lacie%\Sysback
echo Backup is complete
Pause
goto Start


:Restore
copy %lacie%\Remacs_DB "c:\Program Files\ReMACS\DB"
copy %lacie%\Docs\ "c:\Documents and Settings\bagelnet\My Documents"
copy %lacie%\Sysback c:\SYS_BACK
echo Restore is complete.
Pause
goto Start


:Manual 
echo The LaCie was not able to be located.  Please input the LaCie drive letter now.
SET /P drvlet= 
set %lacie%=%drvlet%:
if not exist %lacie% 
echo The LaCie is not connected to that drive. 
Pause
goto Start 




:Exit
exit