Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Touch File
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00602053
Message ID:
00602143
Vues:
22
>Ty Steve. It seems like a nice program, but I can't get it to work. I tried the example on the command line, e.g.:
>>* Retrieve a file’s date/time stamps
>>SET PROCEDURE TO FileTime ADDITIVE
>>oFileTime = CREATEOBJECT(“FileTimes”) <--this causes an error, stating "Unkown Member oFiles. I figure this isn't a big deal, i just deal with this by doing oFileTime.init.
>
>>llresult = oFileTime.GetFilesTime(lcfile, @ltCreate,;
>> @ltAccess, @ltModified)
>
>What would ltCreate look like? @var is simply a what? I tried leaving it blank and got nothing.
>
>>* Set a file’s date/time stamps
>>llresult = oFileTime.SetFilesTime(lcfile, ltCreate,;
>> ltAccess, ltModified)
>
>I tried simply using datetime() for the ltCreate, access, mod but got no change. I'm trying this on an exe, which i hope doesn't make a difference (though I saw some indicationt that it might, in the FileOpen API...)
>
>m

Mike,

The oFile member holds a reference to the FileOpenClose object that's used to do the necessary open and close. The file FileIO.prg contains this object's definition and should be available to the FileTime.prg.

The parameters after lcfile, are the Creation Date/Time, Last Access Date/Time, and the Last Modification Date/Time. So, IOW, the routine expects 1 to 3 datetime data types. If you want to modify the last modification date time only, for example, you'd call SetFilesTime like this
llresult = oFileTime.SetFilesTime(lcfile, , , tModified)
hth,
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform