home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / pcmag / vol9n14.zip / RECONFIG.BAT < prev    next >
DOS Batch File  |  1990-07-03  |  2KB  |  63 lines

  1. @ECHO OFF
  2. CLS
  3. IF "%1" == "" GOTO help
  4. IF "%1" == "?" GOTO showfile
  5. IF "%1" == "/h" GOTO help
  6. GOTO start
  7. :help
  8. ECHO Name:  RECONFIG.BAT   Author:  Kerry L. Nye
  9. ECHO *
  10. ECHO Syntax:  RECONFIG [filespec] [?] [/h]
  11. ECHO *
  12. ECHO This batch file will reconfigure CONFIG.SYS to the
  13. ECHO configuration specified in "filespec".  It copies a
  14. ECHO configuration file to CONFIG.SYS, copies an auto-
  15. ECHO executing batch file to AUTOEXEC.BAT, and performs a
  16. ECHO warmboot.  It checks to see that both files exist in
  17. ECHO the subdirectory where valid application-specific
  18. ECHO CONFIG.SYS and AUTOEXEC.BAT files are maintained.  If
  19. ECHO not, it displays the files in the subdirectory, with an
  20. ECHO appropriate error message.  Calling RECONFIG without a
  21. ECHO parameter or with parameter "/h" will display this
  22. ECHO help, the current CONFIG.SYS and AUTOEXEC.BAT, and the
  23. ECHO configuration file subdirectory.  Calling RECONFIG with
  24. ECHO parameter "?" displays the current CONFIG.SYS and
  25. ECHO AUTOEXEC.BAT and the configuration file subdirectory. 
  26. ECHO RECONFIG accomplishes a warmboot by calling
  27. ECHO WARMBOOT.COM.  Consult the July 1989 PC Magazine
  28. ECHO User-to-User column for information on WARMBOOT.COM.
  29. ECHO *
  30. PAUSE
  31. GOTO showfile
  32. :start
  33. IF EXIST C:\SYS\%1.SYS GOTO onefile
  34. ECHO %1.SYS does not exist on C:\SYS
  35. GOTO nofile
  36. :onefile
  37. IF EXIST C:\SYS\%1.BAT GOTO yesfile
  38. ECHO %1.BAT does not exist on C:\SYS
  39. GOTO nofile
  40. :yesfile
  41. COPY C:\SYS\%1.SYS C:\CONFIG.SYS /V
  42. COPY C:\SYS\%1.BAT C:\AUTOEXEC.BAT /V
  43. WARMBOOT
  44. GOTO END
  45. :showfile
  46. CLS
  47. ECHO The current CONFIG.SYS is:
  48. ECHO *
  49. MORE < C:\CONFIG.SYS
  50. PAUSE
  51. ECHO The current AUTOEXEC.BAT is:
  52. ECHO *
  53. MORE < C:\AUTOEXEC.BAT
  54. PAUSE
  55. :nofile
  56. ECHO *
  57. ECHO The valid configuration files are:
  58. DIR C:\SYS\*.SYS /W
  59. PAUSE
  60. ECHO The valid autoexec files are:
  61. DIR C:\SYS\*.BAT /W
  62. :end
  63.