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,923 of 42,547   
   Kerr-Mudd,John to All   
   Re: delete files except the latest of ev   
   10 Feb 21 13:28:20   
   
   From: notsaying@127.0.0.1   
      
   On Wed, 10 Feb 2021 11:35:28 GMT, Ammammata    
   wrote:   
      
   > there's a backup scheduled daily for many different files   
   >   
   > the related filenames are unique, i.e.   
   >   
   > RSP_backup_2021_02_09_200005_8336305.bak   
   > RSP_backup_2021_02_08_200007_8776502.bak   
   > RSP_backup_2021_02_07_200005_8652391.bak   
   > RSP_backup_2021_02_06_200005_4658428.bak   
   > RSP_backup_2021_02_05_200005_1944601.bak   
   > RSP_backup_2021_02_04_200005_6798320.bak   
   > RSP_backup_2021_02_03_200005_4282408.bak   
   > RSP_backup_2021_02_02_200005_0172624.bak   
   > RSP_backup_2021_02_01_200005_9353583.bak   
   > RSP_backup_2021_01_31_200006_2371866.bak   
   > RSP_backup_2020_12_31_200003_2429004.bak   
   > RSP_backup_2020_10_24_200004_0066296.bak   
   >   
   > I'd like to delete, about every 3-4 months, all the backups except the   
   > lates of every single month, tipically those with date 31/10/20   
   > 30/11/20 31/12/20 31/01/21 etc   
   >   
   > in the above list you can see I kept current month (feb) and left the   
   > latest of each previous one (jan, dec, oct)   
   >   
   > I do this manually, right now it's not a huge tast, using a file   
   > manager, but I wonder whether there is an automated solution since the   
   > different backups will grow   
   >   
   > TIA   
   >   
      
   For /F /?   
      
   It would be simpler to retain the *1st* backup of each month.   
      
      
      
   --   
   Bah, and indeed, Humbug.   
      
   --- 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