Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch    |    Fun with MS-DOS batch files    |    42,547 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 41,024 of 42,547    |
|    marc28@gmail.com to William Allen    |
|    Re: delete files without prompt    |
|    05 Nov 14 03:58:25    |
      On Monday, 16 October 2000 08:00:00 UTC+1, William Allen wrote:       > Terry wrote in message       > > Please excuse this silly post, I do not use batch       > > programming very often and I forgot how this is done.       > >       > > I have put the following command in a batch file       > >       > > del *.*       >       > It's a really bad idea to remove the /Y prompting from this as it       > stands, because if you do, the batch becomes a wipe-directory for       > any current directory it's executed in - including deleting       > itself if it's there! If you run DONTDOIT.BAT with this command       > as you ask for it, you'll see something like this output:       >       > C:\WORK\TEST>DONTDOIT       > All files in directory will be deleted!       > Are you sure (Y/N)?y       > Batch file missing       >       > Oops! Goodbye batch and everything else. The feature you want       > is ECHO Y | (| =pipe command) to send the (Y)es to the command.       > Consider something like:       >       > ECHO Y | DEL C:\specific\path\name\*.* >NUL       >       > (the >NUL silences the waring and over-ride y report). If you       > don't do it this way, you'll probably eventually regret not doing       > so.       >       > --       > William Allen              great post thanks again William              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca