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,930 of 42,547    |
|    Ammammata to All    |
|    Re: delete files except the latest of ev    |
|    15 Feb 21 10:19:45    |
   
   From: ammammata@tiscalinet.it   
      
   Il giorno Thu 11 Feb 2021 12:03:03p, *Herbert Kleebauer* ha inviato su   
   alt.msdos.batch il messaggio news:s032t7$7ut$1@gioia.aioe.org. Vediamo   
   cosa ha scritto:   
      
   > On 11.02.2021 11:57, Herbert Kleebauer wrote:   
   >> @echo off   
   >> for %%i in (01 02 03 04 05 06 07 08 09 10 11 12) do (   
   >> for /f "skip=1" %%j in ('dir /b o-n   
   >> RSP_backup_202?_%%i_??_??????_???????.bak') do echo del %%j) 2>nul   
   >   
   > Sorry, this only works if there are not more backups than   
   > for 12 month in the directory. Otherwise you have to loop   
   > also through the years.   
   >   
   >   
   >   
      
   thank you I'll give it a try   
      
      
   --   
   /-\ /\/\ /\/\ /-\ /\/\ /\/\ /-\ T /-\   
   -=- -=- -=- -=- -=- -=- -=- -=- - -=-   
   ........... [ al lavoro ] ...........   
      
   --- 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