Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does anyone have a prototype getfiledate()
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00319205
Message ID:
00319261
Views:
15
>Does anyone have a prototype function for getting the modify and last accessed dates of a file from VFP? Thanks

Simplest would be to use the Scripting.FileSystemObject automation object from the Windows Script Host; the File and Folder objects can provide DateCreated, DateLastAccessed and DateLastModified as properties.

oFSO = CREATEOBJ('Scripting.FileSystemObject')
oFile=oFSO.GetFile('C:\Autoexec.bat')
? oFile.DateCreated
? oFile.DateLastModified
? oFile.DateLastAccessed
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform