home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch.nt      Fun with Windows NT batch files      68,980 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 67,977 of 68,980   
   Zaidy036 to Ammammata   
   Re: add a counter to the batch file   
   30 Nov 22 12:47:42   
   
   From: Zaidy036@air.isp.spam   
      
   On 11/30/2022 6:31 AM, Ammammata wrote:   
   > Hi   
   >   
   > I use this short batch file:   
   >   
   > for /d /r %%d in (*.*) do rd "%%d"   
   >   
   > to remove empty folders on a backup device (NAS)   
   >   
   > it takes quite a long time to complete, alse because I repeat the   
   > command 10 times, to delete nested folders that have been ignored (not   
   > empty) in the previous run   
   >   
      
   try this - may be faster   
      
   SET _SRC=   
      
   :: Remove empty folders   
   FOR /f "delims=" %%i in ('DIR %_SRC% /AD /S /B ^| SORT /R') DO RD "%%i"   
     > NUL 2>&1   
      
   --- 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