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,975 of 68,980   
   Herbert Kleebauer to Ammammata   
   Re: add a counter to the batch file   
   30 Nov 22 15:58:18   
   
   From: klee@unibwm.de   
      
   On 30.11.2022 12:31, 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)   
   >   
      
   > I'd like to see a sort of counter before the error message, to have a   
   > visual confirmation that the command is running :'), i.e.   
   >   
   > 125 The directory is not empty   
   > 288 The directory is not empty   
   > 327 The directory is not empty   
   > 458 The directory is not empty   
   > and so on   
   >   
      
   @echo off   
   certutil -f -decode %~f0 cr.txt>nul   
   echo.   
      
   for /d /r %%d in (*.*) do (   
     type cr.txt   
     echo.|set /p =%%d       .   
     rd "%%d")   
      
   del cr.txt   
   echo.   
   echo.   
   goto :eof   
      
   -----BEGIN CERTIFICATE-----   
   DQ==   
   -----END CERTIFICATE-----   
      
   --- 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