Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copying and updating time stamp
Message
 
To
20/05/2002 17:02:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00659095
Message ID:
00659116
Views:
29
>>>When I copy a file from one directory to another, I need to update its time stamp. How can I accomplish that from Visual FoxPro?
>>
>>You could use my Windows Time programming from the downloads. It allows you to modify any of the 3 stamps. Normally, I'd like to say you could use the Foxtouch() function in Foxtools, but it doesn't work correctly. The date and time you pass it is interpreted as UTC time instead of local time, so you'd have to adjust for that.
>
>I tried it but this line:
>
>
>goFileTime=CREATEOBJECT('FileTimes')
>
>
>gives Unknown member oFiles.
>
>That line generates an error and the oFiles is fired from: This.oFiles.CloseFile

The first four lines of the prg should read
  * Define constants
  #DEFINE GENERIC_READ  0x80000000
  #DEFINE GENERIC_WRITE 0x40000000
  oConvert = ""
  oFiles = ""
oFiles is the file i/o class.

If any of the above is missing, add it. When the error is raised, it trips the error event, which tries to clean-up any open file handles.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform