home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hot Shareware 37
/
hot37.iso
/
FICHEROS
/
9SEG
/
BACKUP2.ZIP
/
RESTORE.BAT
< prev
Wrap
DOS Batch File
|
1998-04-25
|
2KB
|
100 lines
@echo off
;if "%1"=="" goto dowindir
:dowindir
set direct=%windir%
if "%direct%"=="" goto nowindir
:begin
cls
@echo Press the key corrisponding to the file you wish to restore
@echo A. Win.ini file
@echo B. System.ini
@echo C. Autoexec.bat
@echo D. Config.sys
@echo E. System reg files - Only in Dos Mode
@echo F. Restore all files - Only in Dos Mode
@echo G. Exit Restore
@echo off
choice /c:ABCDEFG Press the appropriate key
if errorlevel 7 goto end
if errorlevel 6 goto all
if errorlevel 5 goto reg
if errorlevel 4 goto config
if errorlevel 3 goto auto
if errorlevel 2 goto sys
if errorlevel 1 goto win
:win
copy win.ini %direct%/y
@echo File Win.ini copied to %direct%
pause
goto begin
:sys
copy system.ini %direct%/y
@echo File System.ini copied to %direct%
pause
goto begin
:auto
copy autoexec.bat c:\
@echo File Autoexec.bat copied to C:\
pause
goto begin
:config
copy config.sys c:\
@echo File Config.sys copied to C:\
pause
goto begin
:reg
attrib -a -h -r -s %direct%\system.dat
attrib -a -h -r -s %direct%\user.dat
attrib -a -h -r -s system.dat
attrib -a -h -r -s user.dat
rename %direct%\system.dat system.bak
rename %direct%\user.dat user.bak
copy system.dat %direct%/y
copy user.dat %direct%/y
attrib +a +h +r +s %direct%\system.dat
attrib +a +h +r +s %direct%\user.dat
del %direct%\*.bak
@echo Files Systen and User.dat copied to %direct%
pause
goto begin
:all
copy win.ini %direct%/y
copy system.ini %direct%/y
copy autoexec.bat c:\
copy config.sys c:\
attrib -a -h -r -s %direct%\system.dat
attrib -a -h -r -s %direct%\user.dat
attrib -a -h -r -s system.dat
attrib -a -h -r -s user.dat
rename %direct%\system.dat system.bak
rename %direct%\user.dat user.bak
copy system.dat %direct%/y
copy user.dat %direct%/y
attrib +a +h +r +s %direct%\system.dat
attrib +a +h +r +s %direct%\user.dat
del %direct%\*.bak
@echo All files copied
:nowindir
@echo please contact martin symonds
@echo at martink@ednet.co.uk
@echo for further advice
:end
exit