Hi all - just wondering if someone has some coding i could use for a batch file in windows
I have a back up folder and files automatically backup with a date and time at the end. Over time this becomes a long list. Can someone share some coding for a batch file that once there is more than 2 of a specific file name [taking into account the file name will have successive dates and times] and then delete them leaving only the 2 latest files of each of the different files in that folder. Only needs to work when i run the batch.
e.g. keep The 2 latest
Apple 2017-01-01 21.30.xls
Apple 2017-01-01 21.59.xls
Apple 2017-01-02 21.10.xls
Apple 2017-01-03 21.150.xls
and keep the 2 latest
Water 2017-01-01 21.30.mdb
Water 2017-01-01 21.59.mdb
Water 2017-01-02 21.10.mdb
Water 2017-01-03 21.15.mdb
Many thanks in anticipation
Ian
I have a back up folder and files automatically backup with a date and time at the end. Over time this becomes a long list. Can someone share some coding for a batch file that once there is more than 2 of a specific file name [taking into account the file name will have successive dates and times] and then delete them leaving only the 2 latest files of each of the different files in that folder. Only needs to work when i run the batch.
e.g. keep The 2 latest
Apple 2017-01-01 21.30.xls
Apple 2017-01-01 21.59.xls
Apple 2017-01-02 21.10.xls
Apple 2017-01-03 21.150.xls
and keep the 2 latest
Water 2017-01-01 21.30.mdb
Water 2017-01-01 21.59.mdb
Water 2017-01-02 21.10.mdb
Water 2017-01-03 21.15.mdb
Many thanks in anticipation
Ian