Guest User

Untitled

a guest
Jun 4th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. if not exist %cd%\ext\ md ext
  3. if not exist %cd%\int\ md int
  4. for /f "skip=1 tokens=1 " %%i in ('help ^| findstr "^[A-Z]" ^| findstr /v "GRAFTABL" ^| findstr /v /x "For" ') do (
  5.     if exist %SYSTEMROOT%\system32\%%i.exe (
  6.         "help" %%i > %cd%\ext\%%i.txt
  7.     ) else (
  8.         if exist %SYSTEMROOT%\system32\%%i.com (
  9.             "help" %%i > %cd%\ext\%%i.txt
  10.         ) else (
  11.             if exist %SYSTEMROOT%\%%i.exe (
  12.                 "help" %%i > %cd%\ext\%%i.txt
  13.             ) else (
  14.                 if exist %SYSTEMROOT%\%%i.com (
  15.                 "help" %%i > %cd%\ext\%%i.txt
  16.                 ) else (
  17.                     "help" %%i > %cd%\int\%%i.txt
  18.                 )
  19.             )
  20.         )
  21.     )
  22. )
Add Comment
Please, Sign In to add comment