delorie.com/archives/browse.cgi | search |
Message-ID: | <3BB3892A.B1C0039A@yahoo.com> |
From: | CBFalconer <cbfalconer AT yahoo DOT com> |
Organization: | Ched Research |
X-Mailer: | Mozilla 4.75 [en] (Win98; U) |
X-Accept-Language: | en |
MIME-Version: | 1.0 |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: get output of commands in batch file redirected to a file |
References: | <Pine DOT OSF DOT 4 DOT 21 DOT 0109270943020 DOT 5453-100000 AT esus DOT cs DOT montana DOT edu> <9ovjt0$1vs$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> |
Lines: | 28 |
Date: | Fri, 28 Sep 2001 00:55:14 GMT |
NNTP-Posting-Host: | 12.90.181.105 |
X-Complaints-To: | abuse AT worldnet DOT att DOT net |
X-Trace: | bgtnsc05-news.ops.worldnet.att.net 1001638514 12.90.181.105 (Fri, 28 Sep 2001 00:55:14 GMT) |
NNTP-Posting-Date: | Fri, 28 Sep 2001 00:55:14 GMT |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Hans-Bernhard Broeker wrote: > > Paula Sanchez <psanchez AT cs DOT montana DOT edu> wrote: > > > I am using DOS 7.10 and I have some batch files that I am not supposed to > > modify its content (I am not allow to redirect the output of each command > > in the batch file). I need to redirect the output of all the commands to > > a file from the calling command line. > > The problem is that batch files are executed by the current instance > of command.com. So no new program is started, and thus the redirection > operation doesn't work. > > The workaround is to start your batchfile in an explicitly called, fresh > command.com, like this: > > command.com /c batchfile > output > > Or compile it using bat2exe :-) or use a non-braindead shell such as 4dos. -- Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT XXXXworldnet DOT att DOT net) (Remove "XXXX" from reply address. yahoo works unmodified) mailto:uce AT ftc DOT gov (for spambots to harvest)
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |