>>>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 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