Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for starthow.bat

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

  1. @ECHO OFF
  2. IF NOT "%OS%"=="Windows_NT" GOTO Syntax
  3. IF      "%~1"==""           GOTO Syntax
  4. IF NOT  "%~2"==""           GOTO Syntax
  5. DIR /A-D "%~1" >NUL 2>&1 || GOTO Syntax
  6.  
  7. SETLOCAL
  8. FOR /F "tokens=1* delims==" %%A IN ('ASSOC %~x1') DO @FOR /F "tokens=1* delims==" %%C in ('FTYPE %%B') DO CALL ECHO.%%D
  9. ENDLOCAL
  10. GOTO:EOF
  11.  
  12.  
  13. :Syntax
  14. ECHO.
  15. ECHO StartHow.bat,  Version 1.00 for Windows NT 4 and later
  16. ECHO Display the command actually issued with the START command
  17. ECHO.
  18. ECHO Usage:    STARTHOW  filename
  19. ECHO.
  20. ECHO Where:    "filename"  is the file that you want to find the START command for
  21. ECHO.
  22. ECHO Example:  STARTHOW  C:\boot.ini
  23. ECHO Returns:  %windir%\system32\NOTEPAD.EXE C:\boot.ini
  24. ECHO Meaning:  START C:\boot.ini will open C:\boot.ini in Notepad
  25. ECHO.
  26. ECHO Note:     Programs like UltraEdit have been known to break the association.
  27. ECHO.
  28. ECHO Written by Rob van der Woude
  29. ECHO http://www.robvanderwoude.com
  30.  

page last modified: 2024-04-16; loaded in 0.0079 seconds