home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / msdos / programm / 11367 < prev    next >
Encoding:
Text File  |  1992-12-13  |  1.5 KB  |  33 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!spool.mu.edu!agate!usenet.ins.cwru.edu!ncoast!brown
  3. From: brown@NCoast.ORG (Stan Brown)
  4. Subject: Re: DOS CONSOLE OUTPUT
  5. Organization: Oak Road Systems, Cleveland Ohio USA
  6. Date: Sun, 13 Dec 1992 23:41:30 GMT
  7. Message-ID: <Bz81t7.E63@NCoast.ORG>
  8. References: <1992Dec11.073326.10891@tc.cornell.edu>
  9. Lines: 22
  10.  
  11. In article <1992Dec11.073326.10891@tc.cornell.edu> homer@theory.TC.Cornell.EDU (Homer Smith) writes:
  12. >    I am using fortran CALL FSYSTEM ('DOS COMMAND') 
  13. >    For example if you copy a file, it always says '1 file copied.'
  14. >    NOTHING must go to the terminal but what I send to it.
  15.  
  16. Most commands will suppress output if you add ">NUL" (note spelling: one
  17. L, not two) at the end.  COPY, alas, is not one of these.
  18.  
  19. Some commands, like COPY, write their output to stderr not stdout.  For
  20. such commands, you must redirect stderr.  The easiest way to do that is
  21. to use the CTTY command, which works in all versions of DOS, at least
  22. since 2.0.  However, I presume that each invocation of FSYSTEM creates a
  23. temporary invocation of COMMAND.COM; thus you cannot call it three times
  24. with "CTTY NUL", the desired command, and "CTTY CON".  Instead you must
  25. write a batch file containing those three commands as three lines, and
  26. call FSYSTEM to invoke the batch file.
  27.  
  28. -- 
  29. Stan Brown, Oak Road Systems                      brown@Ncoast.ORG
  30. Cleveland, Ohio, USA
  31. "Of course I'm an egomaniac.  I've got America's sweetheart climbing up
  32. my drainpipe!"                              -- {Soapdish}
  33.