5 Windows Command Prompt Tricks You Probably Don’t Know

Z

Zaphod Beeblebrox

A note about using && for multiple commands - the subsequent command(s)
only execute if the previous command was successful. To run each
command regardless if the previous succeeds or fails, use a single &.
To run the subsequent command only if the previous fails, use ||.


Another fun tip - tab completion for file and directory names. Start
typing a file name or directory name, then hit tab. It will show the
first file / directory that exactly matches what you've typed so far.
If there is more than one match, tab will cycle through the matches.
If there are no matches, tab will not do anything.
 
C

Char Jackson

A note about using && for multiple commands - the subsequent command(s)
only execute if the previous command was successful. To run each
command regardless if the previous succeeds or fails, use a single &.
To run the subsequent command only if the previous fails, use ||.


Another fun tip - tab completion for file and directory names. Start
typing a file name or directory name, then hit tab. It will show the
first file / directory that exactly matches what you've typed so far.
If there is more than one match, tab will cycle through the matches.
If there are no matches, tab will not do anything.
Useful tips, thanks.
 
C

Char Jackson

Useful, but the article does not state which version they are
for. Presumably, it is meant for 7. Some of the tips work on XP;
some do not.
No one uses XP anymore. ;-)
 
G

Gene Wirchenko

No one uses XP anymore. ;-)
It is my main system. My 7 box is for some development.

I really like to see things properly labelled with a version or a
date. Some day, that page will be out of date.

Imagine reading "We had a wonderful summer vacation in
NiceItalianVillage. We found out that they will be having their 500th
anniversary celebration next year. We are coming back for it." If it
is undated, you do not know if the celebration is upcoming or a
memory. Too many Web pages do not have date or version information.

Sincerely,

Gene Wirchenko
 
S

Stan Brown

I thought I knew cmd. Oh well :)

The 5 tips and some of the replies are good stuff, new to me.
I knew all but the first; I didn't know that "clip" was a device
usable in that way. Thanks to you and the OP for making me look. :)
 
B

Big Steel

I thought I knew cmd. Oh well :)

The 5 tips and some of the replies are good stuff, new to me.

Thanks.
Yeah I didn't know them either. I mainly program, and I go to the
Command Prompt when needed. I get emails from How-2-Geek all the time a
lot of nice tidbits on Windows and other O/S(s).
 
G

Gene E. Bloch

I knew all but the first; I didn't know that "clip" was a device
usable in that way. Thanks to you and the OP for making me look. :)
Part of why I posted is that I thought people would like to know that
the link was valid.

If it wasn't valid, I would have posted something different, I guess :)
 
J

Joe Morris

I knew all but the first; I didn't know that "clip" was a device
usable in that way. Thanks to you and the OP for making me look. :)
Nitpick: it's a command (clip.exe), not a device. The built-in help isn't
much, but there isn't much to the command: you can use it like (quoted from
the help):

DIR | CLIP

or

CLIP < README.TXT


Joe
 
S

Stan Brown

Nitpick: it's a command (clip.exe), not a device. The built-in help isn't
much, but there isn't much to the command: you can use it like (quoted from
the help):

DIR | CLIP

or

CLIP < README.TXT
Thanks for the correction. I just ASSumed it was a device like
"con" (which is not in Win 7, by the way). But that would have been
DIR > CON, not DIR | CON, so of course I should have recognized that
syntactically CLIP had to be a command. Thanks for setting me
straight.
 
J

Joe Morris

Thanks for the correction. I just ASSumed it was a device like
"con" (which is not in Win 7, by the way). But that would have been
DIR > CON, not DIR | CON, so of course I should have recognized that
syntactically CLIP had to be a command. Thanks for setting me
straight.
Um..."CON" (or "CON:") is still very much alive and well in Windows 7. You
might be misled by typing it into the search box and getting the "connect to
a projector" control panel.

Joe
 
R

Roger Mills

Um..."CON" (or "CON:") is still very much alive and well in Windows 7. You
might be misled by typing it into the search box and getting the "connect to
a projector" control panel.

Joe
Yes indeed. You can still create a text file from the keyboard by:
* At the Command Prompt:
* Typing COPY CON {whatever}.TXT
* Typing the file contents
* Finishing with ^Z
--
Cheers,
Roger
____________
Please reply to Newsgroup. Whilst email address is valid, it is seldom
checked.
 
S

Stan Brown

Um..."CON" (or "CON:") is still very much alive and well in Windows
7. You might be misled by typing it into the search box and getting
the "connect to a projector" control panel.
No, I remember getting an error message earlier this week when I
tried to use CON in the old way. I can't remember the details, and
when I tried a test just now (64-bit Win 7 Home Premium) it worked
just fine.
 
T

The Razor's Edge

And who said that DOS doesn't live! Long live DOS the only real OS and it
made Bill what he is today. How many of you grew up with DOS or CPM.
 
T

The Razor's Edge

cmd is DOS and if you know DOS you know everything! It lives it breaths in
the heart of every single Windows OS since Windows 286 and has changed very
little in the last 30 odd years.
 
J

John Williamson

The said:
And who said that DOS doesn't live! Long live DOS the only real OS and it
made Bill what he is today. How many of you grew up with DOS or CPM.
And how many if us have grown out of it over the years?

Either to *nix or other OS's, or have found it easier to manipulate the
DOS kernel commands from within a GUI for 99% plus of what we do. I
suspect what you prefer depends on what level you interact with yoru
computer on.
 
G

Gordon

cmd is DOS and if you know DOS you know everything! It lives it breaths in
the heart of every single Windows OS since Windows 286 and has changed very
little in the last 30 odd years.
Actually you are wrong. The command line in Windows 7 is NOT "dos".
Windows 7 has NO DOS underlying it at all.
 
J

J. P. Gilliver (John)

John Williamson said:
And how many if us have grown out of it over the years?

Either to *nix or other OS's, or have found it easier to manipulate the
DOS kernel commands from within a GUI for 99% plus of what we do. I
suspect what you prefer depends on what level you interact with yoru
computer on.
I think I agree with you, though not sure about the percentage. But I
_do_ use keyboard shortcuts a lot, in nominally GUI softwares; is that
GUI or not?
 

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