home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / australi / joc009.lzh / JOCF.BAT < prev    next >
DOS Batch File  |  1990-12-06  |  4KB  |  87 lines

  1. ECHO OFF
  2. SET DR=%1
  3. CLS
  4. ECHO JOCF.BAT is John Orlay's Cataloger for Floppies    Please read JOCX.DOC
  5. ECHO ~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~~~~
  6. REM  ------------------------------------------------------------------------
  7. :SYNTAX
  8. REM  Now checking syntax
  9. IF NOT %1=="" GOTO DRIVE
  10. ECHO  You forgot to state the drive-parameter !  You must read JOCX.DOC !  
  11. ECHO  The correct syntax at the DOS prompt is           JOCF drive:
  12. ECHO              for example, to catalog drive A:      JOCF A:
  13. GOTO END
  14. REM  ------------------------------------------------------------------------
  15. :DRIVE
  16. ECHO  You specified drive %DR% as the one to be cataloged
  17. ECHO.
  18. ECHO  If %DR% is the drive from which you have invoked JOCF then abort now
  19. ECHO        by entering  two CtrlC-s   Then read JOCX.DOC again !!!
  20. ECHO.
  21. ECHO  If %DR% is a floppy-drive then insert the floppy to be cataloged and
  22. ECHO
  23. PAUSE
  24. REM  ------------------------------------------------------------------------
  25. :VOLUME
  26. ECHO    Now checking whether the disk in drive %DR% has an internal label.
  27. ECHO             IT IS ABSOLUTELY ESSENTIAL TO HAVE SUCH A LABEL
  28. ECHO IF IT DOES NOT EXIST OR IF WRONG, YOU WILL GET AN OPPORTUNITY TO MAKE ONE 
  29. ECHO.
  30. DIR %DR% | FIND "Volume"
  31. ECHO  PLEASE READ THE ABOVE LINE AND ACT AS FOLLOWS :
  32. ECHO If %DR% has an internal label then press key 0 and then the ENTER/RETURN key
  33. ECHO If %DR% has no internal label then press key 1 and then the ENTER/RETURN key
  34. ECHO If you want a different label then press key 1 and then the ENTER/RETURN key
  35. ANSWER
  36. IF %ANSWER%==0 GOTO TREE
  37. IF %ANSWER%==1 GOTO LABEL
  38. ECHO You made an error.  Your choice "%ANSWER%" is illegal !
  39. GOTO VOLUME
  40. REM --------------------------------------------------------------------------
  41. :LABEL
  42. CLS
  43. ECHO This program requires an internal label on the diskette in drive %DR
  44. ECHO                       and will enable you to make a label, or change it.
  45. ECHO                       There must be no "write-protect-sticker" on the disk
  46. ECHO                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  47. PAUSE
  48. LABEL %DR%
  49. REM --------------------------------------------------------------------------
  50. :TREE
  51. ECHO Now making TR.DAT
  52. REM               Looking at disk in drive %DR%
  53. REM               Creates (in current directory) TR.DAT which will consist of :
  54. REM                   Line  1         Volume Label of disk
  55. REM                   Line  2         %DR%     (= drive)
  56. REM                   Lines 3 - end   Pathnames of all directories on %DR%
  57. TREE %DR% > RAWTREE
  58. FIND "FOR VOLUME" RAWTREE > TR1
  59. CHANGE TR1 "DIRECTORY PATH LISTING FOR VOLUME " "" > NUL
  60. ECHO Path: %DR%>> TR1
  61. FIND "Pa" RAWTREE >> TR1 
  62. FIND /V "RAWTREE" TR1 > TR.DAT
  63. CHANGE TR.DAT "---------- TR1" "" > NUL
  64. CHANGE TR.DAT 13,10,13,10 13,10   > NUL
  65. CHANGE TR.DAT "Path: " ""         > NUL
  66. CHANGE TR.DAT 13,10,13,10 ""      > NUL
  67. DEL RAWTREE
  68. DEL TR1
  69. ECHO TR.DAT file created
  70. REM -------------------------------------------------------------------------
  71. REM  Now making C.BAT
  72. GWBASIC M-CBAT
  73. ECHO C.BAT made
  74. REM -------------------------------------------------------------------------
  75. ECHO Now executing C.BAT which makes CRCLOG.DAT and FILELOG.DAT
  76. ECHO                           then executes M-FLDAT.BAT,  which - in turn -
  77. ECHO                                then filters FILELOG.DAT to FL.DAT
  78. ECHO                                then executes DC.BAS to make DC.DAT
  79. ECHO                                then echoes DC.DAT on the screen
  80. ECHO                                and finally deletes all other .DAT files
  81. ECHO.
  82. ECHO Be patient, CRC32 calculations take about 3 minutes per Mb at  4.77 MHz
  83. ECHO ~~~~~~~~~~                       or about 1 minute  per Mb at 16    MHz
  84. C
  85. REM -------------------------------------------------------------------------
  86. :END
  87.