Article View: comp.sys.ibm.pc.programmer
Article #877Re: DOS Batch Programming < 4DOS
From: JOHN MCKEON: STYX RBBS-PC LIMERI...
Date: Fri, 06 Jul 1990 10:19
Date: Fri, 06 Jul 1990 10:19
33 lines
2042 bytes
2042 bytes
In article <1990Jun24.043414.24256@caen.engin.umich.edu>, mrice@caen.engin.umich.edu (Michael Rice) writes: > Hi. I would like to know if the following can be done? > I have a batch file that does a DEL subdirectory > where subdirectory is some temporary directory. The problem is > DOS asks the question about "All files will be deleted Are you > sure? " If you were running under 4DOS, you would use the alias KD, which deletes all the files in the specified subdirectory without prompting, then removes the specified directory. $DOS has many many delightful features and is to be recommended to serious programmers. One of these features is that most of your batch files can be collated into one single batch file called ALIASES.BAT (think of the saving on overheads) which defines or redefines commands. $DOS is a replacement for COMMAND.COM, compatible with versions of DOS from 2.00 upwards, obtainable from SIMTEL. DOS commands are enhanced, and new ones added; for example: DEL (& ERASE) have switches added: DEL/P prompts for confirmation for each file to be deleted DEL/Q suppresses filename echoing during deletion DEL/Y suppresses all prompting, even for *.* You would have one line in ALIASES.BAT as follows: alias kd `del/y %1\*.*^rd %1` Then if you enter >kd c:\scratch it all happens. Magic! ------------------------------------------------------------------- "Eppuor si muove!" (Galileo Galilei) ------------------------------------------------------------------- John McKeon, Material Science Dept. University of Limerick, Ireland also Sysop of STYX RBBS Limerick +353-61-332229 FidoNet 2:253/171
Technical Details
Message-ID:
<5680@ul.ie>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!ukc!tcdcs!swift.cs.tcd.ie!ul.ie!mckeonjReferences:
<1990Jun24.043414.24256@caen.engin.umich.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!ukc!tcdcs!swift.cs.tcd.ie!ul.ie!mckeonj From: mckeonj@ul.ie (JOHN MCKEON: STYX RBBS-PC LIMERICK) Newsgroups: comp.sys.ibm.pc.programmer Subject: Re: DOS Batch Programming < 4DOS Message-ID: <5680@ul.ie> Date: 6 Jul 90 10:19:05 GMT References: <1990Jun24.043414.24256@caen.engin.umich.edu> Organization: University of Limerick, Ireland Lines: 33