home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / UTILS1 / DOUBLE.ZIP / DBL.BAT next >
DOS Batch File  |  1994-02-06  |  4KB  |  106 lines

  1. @echo off
  2. goto Start
  3.                            ┌───────────────
  4.                            │    DBL.BAT    █
  5.                             ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
  6.  
  7.                        Sat  02-05-1994  23:19:58
  8.  
  9.      This batch file DBL.BAT uses the *.COM program ISIT_DBL.COM to
  10.      test a drive to see if it is a compressed DOS 6.0 Double Space
  11.      drive. A nifty idea...
  12.  
  13.      I lifted the Assembly code for ISIT_DBL.COM from a Microsoft
  14.      Knowledge Base article Number: Q101884, August 18, 1993.
  15.  
  16.      If you read MAKE_COM.BAT in this file set it will disclose the
  17.      small improvement I made in the code.
  18.  
  19.      As of this writing I have doped out -mostly- how to translate this
  20.      small piece of Assembly coding into plain vanilla QuickBASIC 4.5
  21.      and should have -that- program done "soon."
  22.  
  23.      Wanted to post this batch file set with the QuickBASIC program,
  24.      but have defaulted to the simple, just... "because."
  25.  
  26.      The *.COM file ISIT_DBL.COM accepts a single drive parameter as C:
  27.      or D: or... uses the drive you are on if NO parameter is entered.
  28.      But if you don't enter a drive letter (and the colon, don't forget
  29.      the colon...) you won't know what drive you are testing as it does
  30.      NOT display the drive letter by itself.
  31.  
  32.      ──────────────────────────────────────────────────────────────────
  33.      Note bene:
  34.  
  35.      Be sure to use both the Drive letter -and- the colon:
  36.  
  37.      ie:                        C:
  38.  
  39.      or you will get a false result
  40.      ───────────────────────────────────────────────────────────────────
  41.  
  42.      ISIT_DBL.COM then uses the DOS Interrupt 2F to see if the DoubleSpace
  43.      "identifier" (4A11H) is there; then sets the ERRORLEVEL to one (1)
  44.      if a Double Space drive is identified or ERRORLEVEL zero (0) if one
  45.      is not found.
  46.  
  47.      DBL.BAT can be put into your AUTOEXEC.BAT and run from there, or it
  48.      can be used to test every drive as I have done with a
  49.      "loop-de-loop" using DBL_TEST.BAT.
  50.  
  51.      DBL_TEST.BAT is one of the weird batch files inspired by my
  52.      BatchMeister mentor Neil Rubenking. DBL_TEST.BAT checks Drives from
  53.      A: to N: to see if any of them are Double Spaced.
  54.  
  55.      If a Double Space drive is identified, you get a mini multi-media
  56.      extravaganza.
  57.  
  58.      If you will download another one of my file sets named 2DRIVE.EXE,
  59.      it will explain fairly well how and where DOS sets the ERRORLEVEL
  60.      number.
  61.  
  62.      Yes... that's right I am trying to learn Assembly and how to "talk
  63.      to DOS." Which reminds me, did you know that DOS spelled backwards
  64.      is "SOD?" Now -that- reminds me of a riddle....
  65.  
  66.      Ahem...
  67.  
  68.      How... do you describe a male agnostic, dyslexic, insomniac?
  69.  
  70.      Give up...???
  71.  
  72.      A man who stays up all night wondering if there is a DOG.
  73.  
  74.  
  75.      John De Palma on CompuServe 76076,571
  76.  
  77. :Start
  78. if not exist isit_dbl.com goto Error
  79. isit_dbl %1
  80. if errorlevel 1 if not errorlevel 2 goto Splash
  81. if errorlevel 0 if not errorlevel 1 goto Failure
  82. :Failure
  83. echo.
  84. echo The drive %1 is =NOT= a DoubleSpace compressed drive.
  85. echo PRESS a key to continue or {Ctrl}+C to end...
  86. pause>nul
  87. goto End
  88. :Splash
  89. echo.
  90. echo                      █▀▀▀▀▀▀▀▀▀▀▀▀▀█
  91. echo                      █  SUCCESS!!! █ │
  92. echo                      █▄▄▄▄▄▄▄▄▄▄▄▄▄█ │
  93. echo                       ───────────────┘
  94. echo                      
  95. echo    ┌─────────────────────────────────────────────────┐
  96. echo    │  DRIVE %1 -is- a DoubleSpace Compressed Drive!  │
  97. echo    │  PRESS a key to continue or {Ctrl}+C to end...  │
  98. echo    └─────────────────────────────────────────────────┘
  99. pause>nul
  100. goto End
  101. :Error
  102. echo.
  103. echo  Can't Run without ISIT_DBL.COM... Ending...
  104. pause
  105. :End
  106.