Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!munnari.oz.au!goanna!giaea!s9100202 From: s9100202@giaea.gi.oz (Lee Hollingworth) Newsgroups: comp.lang.pascal Subject: Re: Redirecting I/O for .BAT files? Message-ID: <1976@giaea.gi.oz> Date: 18 Jun 91 06:05:01 GMT References: <27213@adm.brl.mil> Organization: Monash University College Gippsland, Churchill 3842, Victoria, AUSTRALIA. Lines: 30 In article <27213@adm.brl.mil> s2525090@techst02.technion.ac.il (Eran Davidov) writes: >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 Have you actually tried this? My understanding is that using your example, DOS would create a file OUT.DAT but the size of that file would be 0. To redirect output from a batch file, you must use the Command command. command /c FOO > OUT.DAT This would redirect the output from FOO.BAT to OUT.DAT. ******************************************* Lee Hollingworth s9100202@giae.oz.au Remember: Change is here to stay! *******************************************