🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.msdos.programmer
3 messages
3 total messages Started by Julian Daley Fri, 08 Jan 1993 12:40
Redirecting output from a batch file.
#7532
Author: Julian Daley
Date: Fri, 08 Jan 1993 12:40
25 lines
1062 bytes
Here's an easy one .....

How do I redirect standard output from a .BAT file ?

If I have a one line file TEST.BAT which looks like this -
@echo Hello World

and I type ...

TEST > TEST.OUT

... at the C> prompt I get "Hello World" on the screen and a 0 
length file, TEST.OUT

Is this correct behaviour under DOS 5 ?
Am I going mad ?
Should I switch to UNIX ? (OK, I know the answer to that one !)

Julian.

--
        _____________________________________________________
       | Julian Daley,                     j.daley@ucl.ac.uk |
       | Department Clinical Physics, Guys Hospital, London. |
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Re: Redirecting output from a batch file.
#7544
Author: sph0301
Date: Fri, 08 Jan 1993 21:59
13 lines
1007 bytes
In article <1993Jan8.124018.22988@ucl.ac.uk> uclyjjd@ucl.ac.uk (Julian 
Daley) writes:
>If I have a one line file TEST.BAT which looks like this -
>@echo Hello World
>and I type ...
>TEST > TEST.OUT
>... at the C> prompt I get "Hello World" on the screen and a 0 
>length file, TEST.OUT



For what it's worth, this works as you expect it to under 4DOS - no
echo to the screen and output send to test.out.
Re: Redirecting output from a batch file.
#7548
Author: kraai4712
Date: Fri, 08 Jan 1993 22:37
12 lines
862 bytes
In article <1993Jan8.124018.22988@ucl.ac.uk>, uclyjjd@ucl.ac.uk (Julian Daley) writes:
> Here's an easy one .....
> 
> How do I redirect standard output from a .BAT file ?

Get a copy of Ziff-Davis' BAT2EXEC.COM and use it to compile your batch file
into an executable.

Then you can run the compiled batch file and redirect any standard output just
as you would any other executable.

--jim
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads