Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for bootdrv3.bat

(view source code of bootdrv3.bat as plain text)

  1. @ECHO off
  2. IF not "%1"=="?" IF not "%1"=="/?" GOTO start
  3. ECHO.
  4. ECHO  BOOTDRV with no arguments will display drive letter.
  5. ECHO  BOOTDRV with any argument will set bootdrv variable
  6. ECHO  to drive letter specified by %%comspec%% variable.
  7. ECHO  Laurence Soucy
  8. ECHO  http://bigfoot.com/~batfiles/
  9. GOTO end
  10.  
  11. :start
  12. IF "%comspec%"=="" ECHO  comspec variable not set
  13. IF "%comspec%"=="" GOTO end
  14. IF "%1"=="" GOTO display only
  15. ECHO %comspec%|choice.com/c%comspec%/n set bootdrv=>%temp%.\bootdrv$.bat
  16. FOR %%c in (CALL DEL) do %%c %temp%.\bootdrv$.bat
  17. GOTO end
  18.  
  19. :display only
  20. ECHO %comspec%|choice.com/c:%comspec%/n " "
  21.  
  22. :end
  23.  

page last modified: 2024-02-26; loaded in 0.0175 seconds