Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Touch File
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00602053
Message ID:
00602223
Views:
25
Mike,

The code works fine on .exe files.

Is it possible that the .exe is readonly? Or that it is in use somewhere (thus preventing the timestamps from being changed)?

BTW, there aren't any errors in the program file. ENDPROC is completely acceptable, and the programs need to be in your path (rather than having the path hardcoded in the program itself).

< Update >
Is it your intent to only change the accessed date? This date changes often...it changes even by viewing the properties of a file in My Computer.


HTH,

steve

>Well, I did find a small error in your code, but even ater changing endproc->endfunc on line 25 and fixing the path for contime...it still doesn't work.
>
>I thought it might be a problem simply with changing the timestamps on the exe because foxtouch works on .txt files but not on .exe's. Take a look and perhaps you or another helpful person could point me in the right direction, in terms of using your program.
>
>******
>lcfile = 'C:\Matt\Discovery\LB_400\LogBook\archiver.exe'
>lcfile2 = 'C:\Matt\Discovery\LB_400\LogBook\myfile.txt'
>ltModified = datetime()
>ltCreate = datetime()
>* Retrieve a file's date/time stamps
>SET PROCEDURE TO FileTime ADDITIVE
>oFileTime = CREATEOBJECT("FileTimes")
>llresult = oFileTime.SetFilesTime(lcfile, , , ltModified)
>llresult = oFileTime.SetFilesTime(<b>lcfile2</b>, , , ltModified)
>*******
>I essentially, c&p'ed precisely what you had in the abouttime.doc...Am I missing something?
>
>ty
>m
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform