Alain has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course
Access Introduction course
Access Intermediate course
Access Advanced course
Access VBA course
Introduction to Management course
Creation date and time of a file
Hi,
I would like to check if a file was delivered on an FTP server and be able to get its creation date and time in order to do statistics (and assess the different data providers).
Regarding the first point I intend to check if the file exists. However the name of the file will change every day since it will contain a date stamp. This is why I would need to wildcard part of the name.
Then I would like to check the properties of the file to see its creation date and time without opening it. Alternatively and if there is no other easy solution I am happy for Excel to open the file and get its properties.
Please let me know if you have any suggestion.
I thank you in advance for your help.
Alain
RE: Creation date and time of a file
Hi Alain, thanks for your query. What you want to achieve is a good general use of VBA. I would open the file in memory (using an object variable) and access the file properties that way rather than "manually" opening the file. There's a good walkthrough here, involving the creation of a function to do so:
http://excelexperts.com/Creation-Date-of-Excel-File
Hope this helps,
Anthony