Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!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: <45670029@hpcupt3.cup.hp.com> Date: 27 Jun 91 22:36:55 GMT References: <45670020@hpcupt3.cup.hp.com> Organization: Hewlett Packard, Cupertino Lines: 22 >/ hpcupt3:comp.lang.pascal / defaria@hpcupt3.cup.hp.com (Andy DeFaria) / 11:01 am Jun 26, 1991 / >>So, try it like this: >> >>var >> CommandCom: string; >> >> CommandCom := GetEnv('COMSPEC'); >> SwapVectors; >> Exec (CommandCom, '/c '+CommandCom+' /C C:\ANDY\FOO.BAT > FOO.OUT'); >> SwapVectors; > >OK. I'll try it again - verbatim (plus a Program statement and the >appropriate Begin/End's of course). Don't think it will work but I'll >report it back to you. I have some questions though: Did *you* try this? >Does it work for you? If so, what version of DOS/TP are you using. What >is your chip (mine's an HP Classic Vectra 286 with DOS 3.3 and TP 6.0)? OK I tried it again and it still fails horribly! The disc churns for about 5 seconds when the program is running. What I get in FOO.OUT is a zero length file. Again I ask: Did *you* try this? Does it work for you? Does anybody have anything that really does work!