Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!ux1.cso.uiuc.edu!tank!gargoyle!ddsw1!ddsw1!andyross From: andyross@ddsw1.MCS.COM (Andrew Rossmann) Newsgroups: comp.sys.ibm.pc Subject: Redirecting 4Dos output? ( > nul is bad) Message-ID: <26081bdc-263a.1comp.ibmpc-1@ddsw1.MCS.COM> Date: 22 Mar 90 01:00:05 GMT References: <17026@orstcs.CS.ORST.EDU> Lines: 50 >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.