home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!UB.com!pacbell.com!decwrl!spool.mu.edu!agate!linus!philabs!crpmks!billb
- From: billb@crpmks.uucp (Bill Bochnik (Info Systems))
- Subject: Re: Can't use redirection ">" with EXEC call ???
- Reply-To: billb@crpmks.UUCP (Bill Bochnik (Info Systems))
- Organization: Ciba-Geigy Corporation
- Date: Tue, 26 Jan 1993 16:22:49 GMT
- Message-ID: <1993Jan26.162249.6827@crpmks.uucp>
- References: <C1Bo2x.K6s@DMI.USherb.CA>
- Lines: 25
-
- 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.
- >
- >Guy DesRosiers
- >Universtity of Sherbrooke
- >E-Mail: desrg00@dmi.usherb.ca
- >
-
- I could be wrong, but I think that the redirection is a function of
- COMMAND.COM. If that is the case, you need to EXEC COMMAND.COM, and pass it
- the xcopy b:*.* >result.txt as the rest of the command.
-
- --
- Bill Bochnik | It's hard to be a James Bond in an Abbott
- Systems Analyst | and Costello world.
- Ciba-Geigy Corporation | Signed and sealed, they deliver oblivion.
- philabs!crpmks!billb | It's worse than that, he's dead Jim.
-