Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
tinfanide
- Posts: 117
- Joined: 05 Sep 2011 09:15
#1
Post
by tinfanide » 14 Jan 2012 21:08
How can I in CMD do things same to what is done in the following bat commands:
Code: Select all
@ECHO OFF
::
TIMEOUT /T 5
ECHO 5 seconds have passed
::
PAUSE
IN CMD I have to do the two commands one line.
-
tinfanide
- Posts: 117
- Joined: 05 Sep 2011 09:15
#3
Post
by tinfanide » 14 Jan 2012 22:02
Thanks for that.
I'd like to ask more about the symbols in CMD such as
& / |
How can I use /? to look them up in the cmd console?
-
alan_b
- Expert
- Posts: 357
- Joined: 04 Oct 2008 09:49
#4
Post
by alan_b » 15 Jan 2012 02:35
& simply allows a second command to follow the first on the same line, as in this topic.
All three symbols in " & / | " appear, with many others, when you invoke
SET /?
-
tinfanide
- Posts: 117
- Joined: 05 Sep 2011 09:15
#5
Post
by tinfanide » 15 Jan 2012 02:53
Thanks. But how about this:
bitwise or "|"
in this example:
Code: Select all
TASKLIST /V /FO table | FINDSTR "string" /I
What's the use of "|" before "FINDSTR"?
-
Squashman
- Expert
- Posts: 4472
- Joined: 23 Dec 2011 13:59
#6
Post
by Squashman » 15 Jan 2012 08:42
That is a pipe. You are directing the output of one command and telling the next command to use it as input.
-
tinfanide
- Posts: 117
- Joined: 05 Sep 2011 09:15
#9
Post
by tinfanide » 15 Jan 2012 09:17
Thanks for your link. This really helps me kick off grasping DOS-Command
-
dbenham
- Expert
- Posts: 2461
- Joined: 12 Feb 2011 21:02
- Location: United States (east coast)
#10
Post
by dbenham » 15 Jan 2012 11:51
Wow - That is a great site. I think I've seen references to it by name before, but never actually saw the content until now.
There are a few statements in there that are not true. (for example it states " can't be used as a FOR /F delimiter, when actually it can). But all in all it has fantastic info and is well written.
Dave Benham