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:
00602250
Vues:
23
>The code works fine on .exe files.

I've had no luck with it on either .txt or .exe Perhaps someone could provide an example? As is, the code I've present, doesn't work, i don't know why...

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

no, both the myfile.txt and archiver.exe only have the 'archived' fill attribute.

>BTW, there aren't any errors in the program file. ENDPROC is completely acceptable,

Oh yeah? So you can do a function...endproc and a procedure...endfunc? That is the two keywords are interchangable?

>and the programs need to be in your path (rather than having the path >hardcoded in the program itself).

They are all in the same path, that was one minor problem. The windowstime.zip file had contime in a subdirectory called \Aris\IconEdit...but that's been fixed.

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

I only want to change the modified date, really. I'm implementing a version checking program (yes I was originally checking the programs build verision) but then my boss wanted the ability to rollback to a previously stable version incase the new updated version had some major bug. Its a bit inelegant, the solution I arrived at, but it'll work if I could get this nice abouttime prog working...

The thrust of my question is, what else besides typing these lines, do I need to have inorder to change a file's last_modified timestamp to the current time.

*****
lcfile = 'C:\Matt\Discovery\LB_400\LogBook\archiver.exe'
ltModified = datetime()
SET PROCEDURE TO FileTime ADDITIVE
oFileTime = CREATEOBJECT("FileTimes")
llresult = oFileTime.SetFilesTime(lcfile, , , ltModified)
*****

and if nothing, why isn't it working? Right now, I have this biddy (above 5 lines in a program called main.prg) in a project, with all the 5 programs that came zipped with AboutTime and I make it all into an .exe When I run the .exe it does not update archiver.exe's modified timestamp.

ty
m
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform