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