Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dir command from Access/VBA

Status
Not open for further replies.

smitan

Programmer
May 11, 2002
115
DK
I would like know the date of a file in my Access-project.
The DIR command gives me the name, no more.
Is there another possibility to get this date?

Thanks
Hans
 
Hi

See the FileSystem object, I have not done this, but I believe it has methods which will allow you to retrieve file properties

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
It sure does:
Dim FSO as Object
Dim File AS Object
Set FSO=CreateObject("Scripting.FileSystemObject")
Set File=FSO.GetFile("C:\File.txt")
Debug.Print "Created on", File.DateCreated
Debug.Print "Last Modified on", File.DateLastModified
Debug.Print "Last Accessed on", File.DateLastAccessed

hth

Ben

----------------------------------------------
Ben O'Hara

"Where are all the stupid people from...
...And how'd they get so dumb?"
NoFX-The Decline
----------------------------------------------
 
Thanks a lot you two.
Good solution.
Hans
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top