check for latest backup file

dialup

Board Regular
Joined
Jan 10, 2008
Messages
99
I have a intranet tool which backs up to a csv file every 20 minutes.

When the tool goes down i want to import the data into a set of excel spreadsheets.

the files are named
"Backup" and the date and the time

Backup-2009-02-20-23-40.csv
Backup-2009-02-21-00-00.csv
Backup-2009-02-21-00-20.csv
Backup-2009-02-21-00-40.csv
Backup-2009-02-21-01-00.csv
Backup-2009-02-21-01-20.csv
Backup-2009-02-21-01-40.csv

etc

I have figured out how to get the backup-2009-02-21 (no matter how you format a date vba sees it seperated with/) but want to identify the latest back up for that day.

Can this be done with a macro?
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hi dialup,

You could run a macro to read and load the file names into sheet and sort them in Decending order, then take the top one for loading

ColinKJ
 
Upvote 0
so i just decided to present a userform with 2 comboboxes, one for the hours and the other for the minutes and let the users pick the time themselves
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,424
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top