home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / pascal / 8482 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  1.0 KB

  1. Path: sparky!uunet!cs.utexas.edu!uwm.edu!csd4.csd.uwm.edu!randyd
  2. From: randyd@csd4.csd.uwm.edu (Randall Elton Ding)
  3. Newsgroups: comp.lang.pascal
  4. Subject: Re: Can't use redirection ">" with EXEC call ???
  5. Date: 24 Jan 1993 08:47:43 GMT
  6. Organization: Computing Services Division, University of Wisconsin - Milwaukee
  7. Lines: 21
  8. Message-ID: <1jtl3fINNiqa@uwm.edu>
  9. References: <C1Bo2x.K6s@DMI.USherb.CA>
  10. NNTP-Posting-Host: 129.89.7.4
  11.  
  12. In article <C1Bo2x.K6s@DMI.USherb.CA> desrg00@DMI.USherb.CA (GUY DESROSIERS) writes:
  13. >    I trying to do something like that (under TP 6.0)
  14. >
  15. >    Exec('c:\dos\xcopy.exe', 'b:*.* > result.txt');
  16. >
  17. >    I want to redirect the output in a file (result.txt).
  18. >    Exec doesn't seem to like redirection. Any idea what I
  19. >    do wrong.
  20. >
  21. >    Thanks in advance.
  22. >
  23. I'm not sure about the Exec command, but I know that redirection doesn't
  24. work if you include the crt unit in your code.  You have to redirect
  25. the standard input/output back to the standard device.
  26.  
  27. ex.  close (output);
  28.      assign (output,'');  { assign standard device }
  29.      rewrite (output);
  30.  
  31. Randy.
  32.  
  33.