home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!uwm.edu!csd4.csd.uwm.edu!randyd
- From: randyd@csd4.csd.uwm.edu (Randall Elton Ding)
- Newsgroups: comp.lang.pascal
- Subject: Re: Can't use redirection ">" with EXEC call ???
- Date: 24 Jan 1993 08:47:43 GMT
- Organization: Computing Services Division, University of Wisconsin - Milwaukee
- Lines: 21
- Message-ID: <1jtl3fINNiqa@uwm.edu>
- References: <C1Bo2x.K6s@DMI.USherb.CA>
- NNTP-Posting-Host: 129.89.7.4
-
- In article <C1Bo2x.K6s@DMI.USherb.CA> desrg00@DMI.USherb.CA (GUY DESROSIERS) writes:
- > I trying to do something like that (under TP 6.0)
- >
- > Exec('c:\dos\xcopy.exe', 'b:*.* > result.txt');
- >
- > I want to redirect the output in a file (result.txt).
- > Exec doesn't seem to like redirection. Any idea what I
- > do wrong.
- >
- > Thanks in advance.
- >
- I'm not sure about the Exec command, but I know that redirection doesn't
- work if you include the crt unit in your code. You have to redirect
- the standard input/output back to the standard device.
-
- ex. close (output);
- assign (output,''); { assign standard device }
- rewrite (output);
-
- Randy.
-
-