gatesl@uranus.CS.ORST.EDU (Lee Gates) (03/21/90)
After some dishartening attempts, I have rtfm, and not figured out the change to redirect output to nul. I have several batch files I use daily, and after installing the new version of 4Dos, they aren't getting along too well. I had statements like: execute.exe > nul And 4Dos responded with access denied. So, after reading, tried the >! and the >& options, and still no real progress. I may have missed something (hope not), but how does one keep the batch file quiet? thanx lee -- Lee Gates -- Living in the Land of the Lost, Corvallis OR gatesl@umbra.cs.orst.edu
toma@tekgvs.LABS.TEK.COM (Tom Almy) (03/22/90)
In article <17026@orstcs.CS.ORST.EDU> gatesl@uranus.CS.ORST.EDU (Lee Gates) writes: > After some dishartening attempts, I have rtfm, and not figured >out the change to redirect output to nul. I have several batch files >I use daily, and after installing the new version of 4Dos, they aren't >getting along too well. I noticed this, too, in the new release. The problem occurs when redirecting to any file. It seems to be cause by: 1. Using SHARE (have have a 320 meg partition in DOS 4). and 2. When 4DOS (latest version) redirects output, it opens the file denying access to other programs. This, of course, may make sense for files and most devices, but hardly makes sense for NUL. and 3. If the program run is a TSR, then the handle is left open. Therefore All following programs cannot access that file/device I plan to call on this bug, but have been too lazy to do it yet. Tom Almy toma@tekgvs.labs.tek.com Standard Disclaimers Apply
andyross@ddsw1.MCS.COM (Andrew Rossmann) (03/22/90)
>Item: 9786 by gatesl at uranus.CS.ORST.EDU (0 responses) >Author: [Lee Gates] > Subj: Redirecting 4Dos output? ( > nul is bad) > After some dishartening attempts, I have rtfm, and not figured >out the change to redirect output to nul. I have several batch files >I use daily, and after installing the new version of 4Dos, they aren't >getting along too well. > I had statements like: >execute.exe > nul > And 4Dos responded with access denied. So, after reading, tried >the >! and the >& options, and still no real progress. > > I may have missed something (hope not), but how does one keep >the batch file quiet? > > thanx > lee >Lee Gates -- Living in the Land of the Lost, Corvallis OR >gatesl@umbra.cs.orst.edu I also ran into this problem today! My temporary solution was to replace all the >NUL's with >TMP, and then put this line at the end of the batch file: IF EXIST TMP DEL TMP I'm not really certain what the problem is. The COMPAT.DOC file mentioned problems with SHARE being loaded, but I'm not really sure. You could also run through COMMAND.COM (ugh). It works OK then. command /c execute.exe >nul If you have a program that internally calls a batch file (mine is a QuickBASIC 4.5 program that shells out) you should set the COMSPEC to COMMAND.COM before calling the program: SETLOCAL SET COMSPEC=C:\DOS\COMMAND.COM %COMSPEC /C EXECUTE.EXE >NUL ENDLOCAL Andrew Rossmann andyross@ddsw1.MCS.COM P.S. Don't forget to try the new .BTM files!! As long as you don't load a TSR with it, ANY .BAT file can become a .BTM file by simply changing the extension. .BTM files load the entire thing into memory and run it from there, rather than close and open for EACH line. 4DOS searches for .BTM files BEFORE .BAT files. (.COM, .EXE, .BTM, .BAT). Unfortunately, AUTOEXEC must remain a .BAT file. (anyways, you usually load TSR's with it, making .BTM format questionable.) If you need to speed up AUTOEXEC, put a SWAPPING OFF at the beginning, and then SWAPPING ON at the end. This really speeds things up if you run lots of little programs, and swap to disk.
richard@calvin.spp.cornell.edu (Richard Brittain) (03/22/90)
In article <17026@orstcs.CS.ORST.EDU> gatesl@uranus.CS.ORST.EDU (Lee Gates) writes: > > After some dishartening attempts, I have rtfm, and not figured >out the change to redirect output to nul. I have several batch files >I use daily, and after installing the new version of 4Dos, they aren't >getting along too well. > > I had statements like: >execute.exe > nul > And 4Dos responded with access denied. So, after reading, tried >the >! and the >& options, and still no real progress. > Two possibilities: Do you have noclobber set ? If so, since "nul" already exists, 4dos may not let you overwrite it (it works properly for me, but maybe it is dos version dependant. I have dos 4.01) Also possible, if you have share installed, and install a TSR with output redirected to NUL, you may well end up with a write access handle permanently tied to NUL (since most tsrs don't close stdout before going tsr). 4dos v 3.0 is more observant of correct file sharing then 2.21 was, so a subsequent attempt to open a write access handle to NUL will fail with access denied. Richard Brittain, School of Elect. Eng., Upson Hall Cornell University, Ithaca, NY 14853 ARPA: richard@calvin.spp.cornell.edu UUCP: {uunet,uw-beaver,rochester,cmcl2}!cornell!calvin!richard
sobol@udcps3.cps.udayton.edu (Steven Sobol) (03/25/90)
In article <17026@orstcs.CS.ORST.EDU>, Lee Gates writes: > > After some dishartening attempts, I have rtfm, and not figured >out the change to redirect output to nul. I have several batch files >I use daily, and after installing the new version of 4Dos, they aren't >getting along too well. > > I had statements like: >execute.exe > nul > And 4Dos responded with access denied. So, after reading, tried >the >! and the >& options, and still no real progress. > > I may have missed something (hope not), but how does one keep >the batch file quiet? > Try putting a colon after NUL (although you shouldn't have to do that.) If you want to not echo a line in a batch, put a "@" as the first character in the line. To not echo the whole file, use "@Echo off" as the first line. If you have any more problems, email me... -- Steve Sobol, Founders Hall #318, U. of Dayton, Dayton, OH 45469 (513) 229-1913 ARPA/Internet: sobol@udcps2.cps.udayton.edu or Steven.Sobol@afitamy.fidonet.org I HATE YUCK-NIX! | UUCP: uunet!dayvb!{udcps3|afitamy}!sobol FAX: (513) 229-4000 Disclaimer: "These opinions are MINE, and YOU CAN'T HAVE THEM!!!!!!!"