Article View: alt.msdos.programmer
Article #389Re: Need DOS batch help!
From: Glenn Forbes Larratt
Date: Mon, 17 Aug 1992 17:48
Date: Mon, 17 Aug 1992 17:48
28 lines
1625 bytes
1625 bytes
In article <92225.09262732BFPQ3@CMUVM.CSV.CMICH.EDU> Nathan Owen <32BFPQ3@CMUVM.CSV.CMICH.EDU> writes:
>I having a problem writing a batch file. I need a batch file which will go
>to a c:ΒTemp directory and delete every file in the directory except for
>a file named gest.bat. The batch must be written in such a way they the
>user will not get a message asking Yes/No (Y/N) in response to deleting
>the files , which limits your use of wildcard deletes like del *.*.
>
If you get, by anonymous ftp to wsmr-simtel20.army.mil:
"PD1:<MSDOS.PCMAG>VOL5N09.ARC",1,10219,8,900219,"PC Magazine: NO"
You can then write a batch file thus:
echo off ("@echo off" for DOS 3.30+)
c:
cd \233temp
echo y | no gest.bat del *.* > nul
cd \
What NO does, BTW, is to flag all files matching its first argument as
hidden, then execute the remainder of its command tail as a new command line.
--
===/| Glenn Forbes Larratt | CRC OCIS | "Quid pro quo, |/
==/| glratt@rice.edu (Internet) | Rice University | Clarice." |/=
=/| GLRATT@RICEVM1 (Bitnet) |=================| - The Silence |/==
/| The Lab Ratt (not briggs :-) | Neil Talian? | of the Lambs |/===
Technical Details
Message-ID:
<Bt52sJ.D4M@rice.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!wupost!rice!glrattReferences:
<92225.09262732BFPQ3@CMUVM.CSV.CMICH.EDU>Show Full Headers
Complete Article Headers
Newsgroups: alt.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!wupost!rice!glratt From: glratt@is.rice.edu (Glenn Forbes Larratt) Subject: Re: Need DOS batch help! Message-ID: <Bt52sJ.D4M@rice.edu> Sender: news@rice.edu (News) Organization: CRC OCIS, William Marsh Rice University, Houston, Texas References: <92225.09262732BFPQ3@CMUVM.CSV.CMICH.EDU> Date: Mon, 17 Aug 1992 17:48:17 GMT Lines: 28