Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Syntax to determine date/timestamp of file ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00367851
Message ID:
00367868
Vues:
22
This message has been marked as the solution to the initial question of the thread.
>Is there a function in VFP to obtain the date/timestamp of a text file (or any other file type for that matter?

ADIR() will return one of the three possible time/date stamp pairings; to get at all three, the easiest mechanism is probably to use Scripting.FileSystemObject that comes as a part of the WSH - both the File Object and Folder Object of the FSO have a DateCreated, DateLastAccessed and DateModified property.

oFSO = CREATEOBJ('Scripting.FileSystemObject')
oFile = oFSO.GetFile('C:\FOO\Bar')
? oFile.DateCreated, oFile.DateLastAccessed, oFile.DateModified

THere are also a couple of API mechanisms available to get these values - check the Files section under Win32 and Other APIs.
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform