home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / DOSBOO.ZIP / SNAPSHOT.BAT < prev    next >
DOS Batch File  |  1992-06-06  |  2KB  |  59 lines

  1. @echo off
  2. echo Snapshot
  3. echo Snapshot takes a snapshot of boot sector and system files from
  4. echo a DOS bootable floppy.
  5. echo SYS requires that attrib.exe and debug.exe be in your path.
  6. if "%1" == "A:" goto A
  7. if "%1" == "a:" goto A
  8. if "%1" == "B:" goto B
  9. if "%1" == "b:" goto B
  10. echo  
  11. echo usage: snapshot <drive:>, drive must be A or B (include colon)
  12. goto end
  13. :A
  14. echo Please place a DOS bootable diskette in drive %1 or enter ^C now
  15. pause
  16. echo Copying boot record from drive %1 into boot.rec...
  17. echo l 100 0 0 1 > snapshot.tmp
  18. goto C
  19. :B
  20. echo Please place a DOS bootable diskette in drive %1 or enter ^C now
  21. pause
  22. echo l 100 1 0 1 > snapshot.tmp
  23. :C
  24. echo nboot.rec >> snapshot.tmp
  25. echo rcx >> snapshot.tmp
  26. echo 200 >> snapshot.tmp
  27. echo w >> snapshot.tmp
  28. echo q >> snapshot.tmp
  29. debug < snapshot.tmp
  30. del snapshot.tmp
  31. if not exist %1io.sys goto IBM
  32. echo Copying io.sys, msdos.sys, and command.com from %1...
  33. attrib -r -h -s %1io.sys
  34. copy %1io.sys . > nul:
  35. attrib +r +h +s %1io.sys
  36. attrib -r -h -s %1msdos.sys
  37. copy %1msdos.sys . > nul:
  38. attrib +r +h +s %1msdos.sys
  39. goto get_cmd
  40. :IBM
  41. if not exist %1ibmbio.com goto badthing
  42. echo Copying ibmbio.com, ibmdos.com, and command.com from %1...
  43. attrib -r -h -s %1ibmbio.com
  44. copy %1ibmbio.com . > nul:
  45. attrib +r +h +s %1ibmbio.com
  46. attrib -r -h -s %1ibmdos.com
  47. copy %1ibmdos.com . > nul:
  48. attrib +r +h +s %1ibmdos.com
  49. goto get_cmd
  50. :badthing
  51. echo Cannot find system files on diskette.
  52. goto end
  53. :get_cmd
  54. copy %1command.com . > nul:
  55. echo Your DOS snapshot is now complete.
  56. echo You should now have boot.rec, 2 system files, and command.com
  57. echo in the current directory.
  58. :end
  59.