I wanted to make help generator for all command in help
in Windows cmd and write it to separate files. So you are asking /? on all commands that are on the list when you type help
in cmd.
Here are the main part of my code:
rem mypath - it's a folder where I put my results
rem In help all command are written by capitals letters
for /f "tokens=1 usebackq" %%i in (`help^|findstr /B /R "[QWERTYUIOPASDFGHJKLZXCVBNM][QWERTYUIOPASDFGHJKLZXCVBNM]"`) do (
if NOT "%%i"=="GRAFTABL" (
if NOT "%%i"=="DISKPART" (
if NOT "%%i"=="SC" (
help %%i > !mypath!\%%i.txt
)
)
)
)
I use all sequence from [Q..M] in my Regular exp because there are some problems with just set of [A-Z] But the problem is that in my FOR and IF files - there are help for REM command. Does anyone have any idea why is it so ? To fix it I use:
FOR/? >%mypath%\FOR.txt
IF/? >%mypath%\IF.txt
But I can't understand why it is so.