Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing a file's timestamp
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00298172
Message ID:
00298438
Vues:
18
>>Hi Bryan,
>>
>>It's been awhile.
>>
>>Just a bit of an addendum to what the other's have said. If the file resides on a network, you may or may not be able to do this, depending on the value of the timestamp. I've seen instances where, because the time stamp is not within a valid range for the network OS, that trying to modify the it will fail.
>
>
>Hey George,
>
>Yes, I've been away doing some C++/web stuff. Nice to be back. ;)
>
>Thanks to you, Ed, and Mike for all the tips. While waiting for a response, I tried something similar to what Ed proposed, by just increasing the file size by 1 byte, then returning it to the original size (truncating the original byte). I'll explore Erik's solution as well. Thanks again.

Well, it's good to have you back.

I've played around with this quite a bit using the API. Since you've been working in C++ converting it to VFP should be easy. The trap is that you have to convert the time stamps to UTC time. Easiest would be to populate a SYSTEMTIME structure, convert it to a FILETIME structure (using SystemTimeToFileTime) the convert the FILETIME (which is still local) to a FILETIME that's in UTC using LocalFileTimeToFileTime. This last function takes care of the necessary adjustment without your having to get the time zone information.
George

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

Click here to load this message in the networking platform