Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

2 commands on ONe line (DOS)

228 views
Skip to first unread message

NytMare

unread,
Feb 29, 2000, 3:00:00 AM2/29/00
to
I heard that there is a way to execute two dos commands on the same like..
i.e.. execute dir and doskey? or any other dos commands.

AnyOne know how?

--
Posted via CNET Help.com
http://www.help.com/

Outsider

unread,
Feb 29, 2000, 3:00:00 AM2/29/00
to
NytMare wrote:
>
> I heard that there is a way to execute two dos commands on the same like..
> i.e.. execute dir and doskey? or any other dos commands.
>
> AnyOne know how?
>
> --


http://bigfoot.com/~batfiles/main/batricks.htm
20. Use the pipe to place seperate commands on one line.
21. Del all files in a directory, regardless of attributes.
22. Multiple pipes, and an ansi trick.
23. Place comments on a command line.

--
Regards,
Outsider
MS-DOS 6.22, Windows for Workgroups 3.11, Netscape Navigator 4.08
"Don't overestimate the decency of the human race." -- H.L. Mencken

Tom Lavedas

unread,
Feb 29, 2000, 3:00:00 AM2/29/00
to
NytMare wrote:
>
> I heard that there is a way to execute two dos commands on the same like..
> i.e.. execute dir and doskey? or any other dos commands.
>
> AnyOne know how?
>
> --
> Posted via CNET Help.com
> http://www.help.com/

With DOSKEY already loaded, a Control-T can be used as a command line
command separator.

Without DOSKEY loaded, a FOR statement can be used (at the command
prompt or in a batch procedure, etc.). Try something like this ...

for %v in (dir doskey) do %v

Double up the percent signs for use in a batch procedure.

In Win 95/98 double quotes can be used to add parameters. For example,
...

for %v in ("dir somefile.* /b" doskey) do %v

One other trick is to use the PIPE symbol, as long as long as the
statement being piped doesn't create useful output, the statement being
piped into doesn't require/use information piped into it and you don't
mind creating a couple of useless temporary files, something like ...

doskey | dir somefile.* /b

Tom Lavedas
-----------
http://www.pressroom.com/~tglbatch/

Outsider

unread,
Feb 29, 2000, 3:00:00 AM2/29/00
to
Tom Lavedas wrote:
>
> NytMare wrote:
> >
> > I heard that there is a way to execute two dos commands on the same like..
> > i.e.. execute dir and doskey? or any other dos commands.
> >
> > AnyOne know how?
> >
> > --
>
> With DOSKEY already loaded, a Control-T can be used as a command line
> command separator.

Cool trick Tom!
BTW, do you happen to have a list of the various control
characters which can be used at the prompt, in batch files
or written either in qbasic edit or the stand alone version?

Charles Dye

unread,
Mar 1, 2000, 3:00:00 AM3/1/00
to
On Tue, 29 Feb 2000 12:32:50 -0500, Tom Lavedas
<lav...@pressroom.com> wrote:

>NytMare wrote:
>>
>> I heard that there is a way to execute two dos commands on the same like..
>> i.e.. execute dir and doskey? or any other dos commands.
>

>With DOSKEY already loaded, a Control-T can be used as a command line
>command separator.

Control-T is also the default command separator in Toddy, but you can
set a different one using the /CC switch.

Under 4DOS the default command separator is ^ (the caret or shift-6,)
but you can change it using SETDOS /C.

ras...@highfiber.com


0 new messages