🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.misc
Article #3958

Re: HELP.... is there a way to redirect error msg?

#3958
From: John Savage
Date: Thu, 28 Sep 1995 00:00
30 lines
1851 bytes
starshtr@wam.umd.edu (Cowboy) writes:
>Does anyone know of a way to redirect std error messages in dos to a file?
>I need something that works on the command line similar to unix; &> <file>

Under DOS, to redirect stderr but not stdout, use rdstderr.

ftp ftp.cdrom.com /pub/simtel/msdos/sysutil/
rdstderr.zip   5394  880306  Redirect STDERR to a file, with src (freeware)
redir.zip      7951  900803  Combines STDERR with STDOUT for redirection

To illustrate: Consider an attempt to copy a non-existent file JKJ:
~~~~~~~~~~~~~
C:\>copy jkj www
File not found - JKJ
        0 file(s) copied

C:\>copy jkj www >outfile
File not found - JKJ

C:\>rdstderr errfile copy jkj www >outfile

C:\>type errfile
File not found - JKJ

C:\>type outfile
        0 file(s) copied

This redirection applies only while executing the commandline program.
--
John Savage               koala@sydney.dialix.com.au
Technical Details
Message-ID: <44e155$gqr$1@sydney.DIALix.oz.au>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <43c3r0$5bo@cville-srv.wam.umd.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d683,9ee0c89b1f72d46e,start
X-Google-Attributes: gid10d683,public
X-Google-Thread: f53ba,9ee0c89b1f72d46e,start
X-Google-Attributes: gidf53ba,public
X-Google-Thread: 1674b9,9ee0c89b1f72d46e,start
X-Google-Attributes: gid1674b9,public
X-Google-Thread: 111d31,9ee0c89b1f72d46e,start
X-Google-Attributes: gid111d31,public
X-Google-Thread: f71eb,e3f5645e111501ef
X-Google-Attributes: gidf71eb,public
From: John Savage <koala@sydney.dialix.com.au>
Subject: Re: HELP.... is there a way to redirect error msg?
Date: 1995/09/28
Message-ID: <44e155$gqr$1@sydney.DIALix.oz.au>
X-Deja-AN: 110918605
sender: koala@sydney.DIALix.oz.au
references: <43c3r0$5bo@cville-srv.wam.umd.edu>
organization: Gumleaf Smoke Signals Telegraph Company
newsgroups: comp.os.msdos.misc,comp.binaries.ibm.pc.wanted,comp.archives.msdos.d,comp.sys.ibm.pc.misc,aus.computers.ibm-pc