home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / alt / msdos / programm / 2208 < prev    next >
Encoding:
Text File  |  1992-08-17  |  1.5 KB  |  40 lines

  1. Newsgroups: alt.msdos.programmer
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!wupost!rice!glratt
  3. From: glratt@is.rice.edu (Glenn Forbes Larratt)
  4. Subject: Re: Need DOS batch help!
  5. Message-ID: <Bt52sJ.D4M@rice.edu>
  6. Sender: news@rice.edu (News)
  7. Organization: CRC OCIS, William Marsh Rice University, Houston, Texas
  8. References: <92225.09262732BFPQ3@CMUVM.CSV.CMICH.EDU>
  9. Date: Mon, 17 Aug 1992 17:48:17 GMT
  10. Lines: 28
  11.  
  12. In article <92225.09262732BFPQ3@CMUVM.CSV.CMICH.EDU> Nathan Owen <32BFPQ3@CMUVM.CSV.CMICH.EDU> writes:
  13. >I having a problem writing a batch file.  I need a batch file which will go
  14. >to a c:¢Temp directory and delete every file in the directory except for
  15. >a file named gest.bat.  The batch must be written in such a way they the
  16. >user will not get a message asking Yes/No (Y/N) in response to deleting
  17. >the files , which limits your use of wildcard deletes like del *.*.
  18. >
  19.  
  20. If you get, by anonymous ftp to wsmr-simtel20.army.mil:
  21.  
  22.     "PD1:<MSDOS.PCMAG>VOL5N09.ARC",1,10219,8,900219,"PC Magazine: NO"
  23.  
  24. You can then write a batch file thus:
  25.  
  26. echo off        ("@echo off" for DOS 3.30+)
  27. c:
  28. cd \233temp
  29. echo y | no gest.bat del *.* > nul
  30. cd \
  31.  
  32. What NO does, BTW, is to flag all files matching its first argument as
  33. hidden, then execute the remainder of its command tail as a new command line.
  34.  
  35. -- 
  36. ===/| Glenn Forbes Larratt      |    CRC OCIS     | "Quid pro quo,   |/
  37. ==/| glratt@rice.edu (Internet) | Rice University | Clarice."       |/=
  38. =/| GLRATT@RICEVM1 (Bitnet)     |=================|  - The Silence |/==
  39. /| The Lab Ratt (not briggs :-) |  Neil  Talian?  |  of the Lambs |/===
  40.