Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!elroy.jpl.nasa.gov!sdd.hp.com!hplabs!hpcc05!hpyhde4!hpycla!hpcuhc!hpcupt3!defaria@hpcupt3.cup.hp.com From: defaria@hpcupt3.cup.hp.com (Andy DeFaria) Newsgroups: comp.lang.pascal Subject: Re: Redirecting I/O for .BAT files? Message-ID: <45670021@hpcupt3.cup.hp.com> Date: 19 Jun 91 01:01:17 GMT References: <45670020@hpcupt3.cup.hp.com> Organization: Hewlett Packard, Cupertino Lines: 21 >/ hpcupt3:comp.lang.pascal / s2525090@techst02.technion.ac.il (Eran Davidov) / 4:04 pm Jun 16, 1991 / >If you want to Redirect the IO from a batch file, there must first of >all be an output to redirect. >when you used the "@echo off", you made sure nothing was to be printed to the >screen. therefore, nothing was redirected. try the following batch file: >--- start of batch >DIR >--- end of batch > >now, when you use it this way: FOO > OUT.DAT >the output will be redirected to a file, instead of appearing on your screen. > > Hope it helps, Eran This is totally untested and blantly false. "@echo off" does no such thing and the example .BAT file just does a DIR to the screen (and creates a zero length OUT.DAT file) when FOO > OUT.DAT is executed. I guess I'll just have to re-implement the wheel, open the .BAT file and execute the commands myself, redirecting output as I go. This is gonna be a pain, unless someone knows a better answer....