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

  1. Newsgroups: alt.msdos.programmer
  2. Path: sparky!uunet!decwrl!deccrl!bloom-beacon!bloom-picayune.mit.edu!athena.mit.edu!chanh
  3. From: chanh@athena.mit.edu (Chanh N. Vuong)
  4. Subject: Re: Need DOS batch help!
  5. Message-ID: <1992Aug12.141526.25165@athena.mit.edu>
  6. Sender: news@athena.mit.edu (News system)
  7. Nntp-Posting-Host: e40-008-7.mit.edu
  8. Organization: Massachusetts Institute of Technology
  9. References: <92225.09262732BFPQ3@CMUVM.CSV.CMICH.EDU>
  10. Date: Wed, 12 Aug 1992 14:15:26 GMT
  11. Lines: 35
  12.  
  13. In article <92225.09262732BFPQ3@CMUVM.CSV.CMICH.EDU> Nathan Owen <32BFPQ3@CMUVM.CSV.CMICH.EDU> writes:
  14. >I having a problem writing a batch file.  I need a batch file which will go
  15. >to a c:\Temp directory and delete every file in the directory except for
  16. >a file named gest.bat.  The batch must be written in such a way they the
  17. >user will not get a message asking Yes/No (Y/N) in response to deleting
  18. >the files , which limits your use of wildcard deletes like del *.*.
  19. >
  20. >Thanx in advance.
  21.  
  22. Here goes:
  23.  
  24. DEL_TEMP.BAT:
  25. @echo off
  26. c:
  27. cd \
  28. cd temp
  29. md tmp
  30. copy gest.bat tmp
  31. for %%a in (*.*) do del %%a
  32. copy c:\temp\tmp\gest.bat .
  33. del c:\temp\tmp\gest.bat
  34. rd tmp
  35. cd \
  36.  
  37. *The End*
  38.  
  39.     +------------------------------------------------------+
  40.     |  |\/\/\/|       Chanh N. Vuong (aka Cee Vee)         |
  41.     |  |      |       chanh@athena.mit.edu                 | 
  42.     |  | (o)(o)       (617)225-6302 or x5-6302             | 
  43.     |  C     _)                                            |
  44.     |  | ,___|        Hey, like don't eat a cow, man!      |
  45.     |  |   / ----------------------------------------------+
  46.     | /____\     VegieBart Inc., copyright 1991.
  47.  
  48.