Hello Jonathan,
\|/ Subject: Preventing DEL from displaying things
/|\ On Thursday April 02 1998 at 11:05,
you wrote to Gerald Miller saying:
TM>>> del /q/s/z anti-vir.dat > nul
GM>> display when using `> nul` (which I've since removed).
JP> As I said, use the /E switch to the DEL command. This is the best
JP> solution.
Yes, thank you, but this has already been pointed out to me.
JP> The second best solution is to note that errors are sent by the DEL
JP> command to the standard *error*, and *not* to the standard output.
JP> (All well-written commands will do this. It is a widely accepted
JP> convention.) "> NUL" only redirects standard output. To redirect
JP> standard error, use
JP> del /q/s/z anti-vir.dat >& nul
This was what I was searching for! In my haste to find a solution, I took
the convoluted approach and used a series of IF EXIST filename .AND. ....,
which appears to be doing the job I intended.
JP> If you have 4OS2, Take Command for OS/2, or indeed anything other than
JP> 4DOS, then the syntax can also be
JP> del /q/s/z anti-vir.dat > nul 2>&1
I thank you for taking the time to respond to my query. I have snipped your
message and included it in my KEEPER directory, for future references.
G'Day ... Gerald
--- GoldED/386 3.00.Beta2 UNREG
---------------
* Origin: It's Miller Time! (1:10295/6)
|