home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 37 / hot37.iso / FICHEROS / 9SEG / BACKUP2.ZIP / RESTORE.BAT < prev   
DOS Batch File  |  1998-04-25  |  2KB  |  100 lines

  1. @echo off
  2. ;if "%1"=="" goto dowindir
  3.  
  4. :dowindir
  5. set direct=%windir%
  6. if "%direct%"=="" goto nowindir
  7.  
  8. :begin
  9. cls
  10. @echo  Press the key corrisponding to the file you wish to restore
  11. @echo A. Win.ini file
  12. @echo B. System.ini 
  13. @echo C. Autoexec.bat
  14. @echo D. Config.sys
  15. @echo E. System reg files  - Only in Dos Mode
  16. @echo F. Restore all files - Only in Dos Mode
  17. @echo G. Exit Restore
  18. @echo off
  19. choice /c:ABCDEFG Press the appropriate key
  20. if errorlevel 7 goto end
  21. if errorlevel 6 goto all
  22. if errorlevel 5 goto reg
  23. if errorlevel 4 goto config
  24. if errorlevel 3 goto auto
  25. if errorlevel 2 goto sys
  26. if errorlevel 1 goto win
  27.  
  28. :win
  29. copy win.ini %direct%/y
  30. @echo File Win.ini copied to %direct%
  31. pause
  32. goto begin
  33.  
  34. :sys
  35. copy system.ini %direct%/y
  36. @echo File System.ini copied to %direct%
  37. pause
  38. goto begin
  39.  
  40.  
  41. :auto
  42. copy autoexec.bat c:\
  43. @echo File Autoexec.bat copied to C:\
  44. pause
  45. goto begin
  46.  
  47.  
  48.  
  49. :config
  50. copy config.sys c:\
  51. @echo File Config.sys copied to C:\
  52. pause
  53. goto begin
  54.  
  55.  
  56. :reg
  57.         
  58. attrib -a -h -r -s %direct%\system.dat
  59. attrib -a -h -r -s %direct%\user.dat
  60. attrib -a -h -r -s system.dat
  61. attrib -a -h -r -s user.dat
  62. rename %direct%\system.dat system.bak
  63. rename %direct%\user.dat user.bak
  64. copy system.dat %direct%/y
  65. copy user.dat  %direct%/y
  66. attrib +a +h +r +s %direct%\system.dat
  67. attrib +a +h +r +s %direct%\user.dat
  68. del %direct%\*.bak
  69. @echo Files Systen and User.dat copied to %direct%
  70. pause
  71. goto begin
  72.  
  73. :all
  74. copy win.ini %direct%/y
  75. copy system.ini %direct%/y
  76. copy autoexec.bat c:\
  77. copy config.sys c:\
  78. attrib -a -h -r -s %direct%\system.dat
  79. attrib -a -h -r -s %direct%\user.dat
  80. attrib -a -h -r -s system.dat
  81. attrib -a -h -r -s user.dat
  82. rename %direct%\system.dat system.bak
  83. rename %direct%\user.dat user.bak
  84. copy system.dat %direct%/y
  85. copy user.dat  %direct%/y
  86. attrib +a +h +r +s %direct%\system.dat
  87. attrib +a +h +r +s %direct%\user.dat
  88. del %direct%\*.bak
  89.  
  90. @echo All files copied
  91. :nowindir
  92.  
  93. @echo please contact martin symonds
  94. @echo at martink@ednet.co.uk
  95. @echo for further advice
  96.  
  97. :end
  98. exit
  99.  
  100.