home bbs files messages ]

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,031 of 42,547   
   foxidrive to Batchman   
   Re: delete files without prompt   
   02 Dec 14 12:37:12   
   
   From: foxidrive@server.invalid   
      
   On 2/12/2014 10:55, Batchman wrote:   
      
   Hi Batchman :)   
      
   > Well what could be done initially is...   
   >   
   > If NOT exist c:\targetdir\nul goto Quit   
      
   The NT way of doing this doesn't use nul, coz it no longer works properly:   
      
   If NOT exist "c:\targetdir\" goto Quit   
      
      
   Just commenting here that double quotes are needed around %%f to handle any   
   filenames with spaces   
   etc, and also around the path for the same reason.   
      
      
   for %%f in ("c:\path-to\*.*") do del "%%f"   
      
   --- 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