How to get CMD.EXE HELP command text?

D

Dave Venus

Hi!

The HELP command at the CMD.EXE prompt gives more/better
help than the on-line Windows HELP does. Is this stored in
a standard .HLP or .CHM file somewhere? If not how is it
generated and how do I get all of that info. Have searched
the MS site with no luck.

Thanks in advance for any help you can provide. If this is
in a FAQ, etc. please point me in the right direction.

Dave Venus
 
P

Phil Robyn [MVP]

Dave said:
Hi!

The HELP command at the CMD.EXE prompt gives more/better
help than the on-line Windows HELP does. Is this stored in
a standard .HLP or .CHM file somewhere? If not how is it
generated and how do I get all of that info. Have searched
the MS site with no luck.

Thanks in advance for any help you can provide. If this is
in a FAQ, etc. please point me in the right direction.

Dave Venus

For individual commands, type '(command) /?' (without apostrophes)
at the CMD prompt, e.g.,

sort /?

To create a file (c:\temp\helpfile.txt) containing the help information
for most of the commands, you could use the following:

=====begin C:\cmd\test\gethelp.cmd ====================
01. @echo off
02. setlocal
03. type nul > %temp%\helpfile.txt
04. set cd=
05. for /f "tokens=*" %%* in (
06. 'help ^| find /n /v "zzzzzzz"') do call :collect %%*
07. goto :EOF
08. :collect
09. set inrec=%*
10. set nrec= blank
11. if not defined cd set inrec=%inrec:~1%
12. for /f "tokens=2 delims=]" %%* in ("%inrec%") do set nrec=%%*
13. if "%nrec:~0,1%"==" " goto :EOF
14. echo>>%temp%\helpfile.txt ------------------------%nrec:~0,8%-----------------------
15. echo.>>%temp%\helpfile.txt
16. help %nrec:~0,8% >> %temp%\helpfile.txt
17. echo.>>%temp%\helpfile.txt
18. goto :EOF
=====end C:\cmd\test\gethelp.cmd ====================

There is a much nicer version around somewhere that creates HTML text....
 
J

Jerold Schulman

Hi!

The HELP command at the CMD.EXE prompt gives more/better
help than the on-line Windows HELP does. Is this stored in
a standard .HLP or .CHM file somewhere? If not how is it
generated and how do I get all of that info. Have searched
the MS site with no luck.

Thanks in advance for any help you can provide. If this is
in a FAQ, etc. please point me in the right direction.

Dave Venus


See tip 2815 in the 'Tips & Tricks' at http://www.jsiinc.com for detailed help
on commands.

Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top