help: list of commands

J

JClark

Hello group:

Seems like there should be a simple answer, but I can't find it.

When I go to command prompt in Win 2k and type "help", the list of
commands goes by so fast that I miss the first half. I tried old DOS
switches /p and /w, but these don't work. Any way to see them all?
Thanks.

Jack
 
W

Walter Schulz

When I go to command prompt in Win 2k and type "help", the list of
commands goes by so fast that I miss the first half. I tried old DOS
switches /p and /w, but these don't work. Any way to see them all?

The old DOS command you're looking for is
help | more

Ciao, Walter
 
H

Herb Martin

My favorite is based on just redirecting it to a text file, e.g.,

help >helpcmds.txt
for >for.txt

Then you can bring up helpcmds.txt or for.txt in notepad.

Also join the following three? lines to make one command line:
@(help >help.txt) && for /f "delims=abcdefghijklmnopqrstuvwxyz. "
%%a in ('help') do @echo+>>help.txt &&
@echo ==== %%a ====>>help.txt && @help %%a>>help.txt

I call this "HelpTxt.cmd" -- if you run it from the command line then
substitute ONE "%" on each "%a"

This will give you the help summary followed by help text on each
(or at least most) of the commands.

For some odd reason it fails now on Win2003 (in both weird and
odd ways) but works fine on WIn2000 (don't know about XP.)
 
G

guard

As far as shell scripting is concerned...

TheGuardBook contains a "Mounted Help" page for each internal cmd.exe
command. This is a single color-keyed page, highlighting the differences
among the NT/2K/XP/K3 versions. The complete help text for each OS is also
available for comparison (http://TheSystemGuard.com/TheGuardBook/CCS-Int).

-tsg
____________________________________________________________
TheSystemGuard.com | BoomingOrFuming.com | MountCommands.com
Free and "Almost Free" Knowledge for Windows System Admins!
 
P

Phil Robyn

JClark said:
Herb:
I tried to use this:

help >helpcmds.txt
for >for.txt

by putting it into notepad and saving it as a .cmd file. But it
doesn't seem to do anything. I get a lightning flash of the black cmd
screen and that's all. I'm sure it's just my ignorance about batch
programming in Win 2K. What am I missing?

By the way, what is windows 2003?

Many thanks.

Jack

for /? > for.txt
 
H

Herb Martin

JClark said:
Herb:
I tried to use this:

help >helpcmds.txt
for >for.txt

by putting it into notepad and saving it as a .cmd file. But it
doesn't seem to do anything. I get a lightning flash of the black cmd
screen and that's all. I'm sure it's just my ignorance about batch
programming in Win 2K. What am I missing?

Ok, but you need to develop a new habit -- run most of your
command files from a pre-existing Command prompt, then
when they finish the "black screen" will stay open and you can
read the results or issue another command to view the results,
etc.

In fact, do the following (on faith and make you own choices later):
First hit (or use your mouse):

Start(WinKey)\Run(R)\cmd <enter>

The key is to run "Cmd.exe" and get a command window open.

Now you have a command prompt and LEAVE IT OPEN FOREVER.
(until you reboot and open another one next time you boot.)

Second, let's make a better command prompt by Right-Clicking Properties:

Start\Programs\Accessories\Command Prompt <RIGHT CLICK>

Select Properties
On the various "Tabs" do these steps (leave the rest at defaults):
Short Tab \ShortCut Key -- Press Ctrl-Alt-d
(you can't really type, just press the sequence)
Options Tab: QuickEdit mode CHECK, Insert Mode CHECK
Discard old duplicates CHECK, Window SELECTED
Layout Tab-- Screen Buffer Size HEIGHT 2300 if you have tons
of RAM, at least 1000 (2300 because I just type a "2" in front
of the default "300")
Window Size Height = 30, 35, 45 depending what just fits
comfortably on YOUR screen, or leave it at the default 25
Color Tab -- Screen Background Dark Blue (on the left near black)
Screen text -- Bright Yellow (in the right near the white)

Say Ok and save it all.

What did we do? We got you a nice scroll back buffer (1000+ lines),
quickedit for mouse selection, colors that are easier on the eyes (and
more attractive) plus they signal you that YOU setup this prompt and
are not using the defaults, more lines on the screen (less backscrolling
needed), AND a "short cut" key to bring this up.

Ok, get back to the prompt Start\Programs\Accessories and select
that Command Prompt and HOLD CONTROL while dragging it
to the "quick launch" bar near the "Start" button. Release.

Now you have a "quick launch" to this "command prompt" you setup.

Also try this: Ctrl-Alt-d

If it pops up automatically then you setup the "hotkey" correctly.
Why "d"? Had to pick something and "d" stands for DOS which reminds
ME of the "dos prompt" (Note: It isn't really a "dos" prompt but a lot
of people call it that and one Icon Microsoft used to use had MSDOS on
it.)

Ok, now use your command prompt -- change to the root of the C: drive
if necessary "cd /d C:\" -- do this manually -- the /d just makes sure if
you
are on the D: or E: you will also change "drives" and not just
subdirectories.

Now make yourself a "bat" directory -- md c:\bat
Make a habit of keeping your "batch files" in here. You could also name
it "C:\cmd" but those of us who have been doing this for years (before .CMD
files) tend to call it C:\bat.

Now if you keep you batch files together here, you can always find them
by going there from the command prompt or opening them there with Notepad
etc.

You might wish to also (at some point) add this directory to your PATH.
(We will explain that later if you don't know how -- it's in the System
Control
panel Advanced though.)

Change to your batch directory: cd /d c:\bat
Now MANUALLY run the commands I gave you (there):

help >helpcmds.txt
for /? >for.txt

Now do a "dir" and you should see your two text files (stay in the
habit of running from the command line and avoid Explorer until
you get good at this.)

Type the name of (each of) the files, one at a time and with look
Notepad will open:

C:\> helpcmds.txt
C:\> for.txt

This works because of the file extension association between .TXT
and notepad -- and because of this you MUST type the whole name
to "run a textfile". For EXEs and CMD files you can usually omit the
extension but to "run the application for a document by association"
you must type the whole thing.

Enjoy.
By the way, what is windows 2003?

The NEXT version of Windows 2000 or Windows XP.

Technically Win2000 is just NT 5.0, WinXp is 5.1, and Win2000 Server
is 5.2
Many thanks.

Sure...too few people know how to use the command line and also how
to write batch files.

Remember MOST things you can type at the command prompt work
in batch files and vice versa (there are a few MINOR differences and
there are obviously some commands for batch files that make little sense
when run interactively.)
 
A

Al Dunbar

So, in order to find out about batch commands, go to a site that claims to
offer something better, and expect an unbiased explanation lacking in
commercial ads? I don't think so.

The only good thing I found on the site is a verbatim copy of the help text
available from CMD.EXE itself. And, of course, you don't need to go to a web
site to find that.

/Al
 
B

Bob I

Not to drag you away from the command line but if you go to the desktop
and hit F1 and put Command Reference in the Index search box you have
the whole ball of wax at your finger tips.
 
H

Herb Martin

That is a good tip -- I still like the "for...in...do" loop as it
puts it all in one file and encourages the beginner to start
using one of the most powerful idioms....

Your tip is still good.

Now if I just knew a good way to remember how to look
up the "standard error" redirect to "standard input" redirect
to a file (in six months when I have forgotten it...)

xcopy *.* \\server\share >c:\log.txt 2>&1

<grin>
 

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