🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #6395

Re: DOS CONSOLE OUTPUT

#6395
From: Stan Brown
Date: Sun, 13 Dec 1992 23:41
22 lines
1576 bytes
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}
Technical Details
Message-ID: <Bz81t7.E63@NCoast.ORG>
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!agate!usenet.ins.cwru.edu!ncoast!brown
References: <1992Dec11.073326.10891@tc.cornell.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!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