Information générale
Catégorie:
Contrôles ActiveX en VFP
Titre:
File system object and date of last access
Versions des environnements
When trying to weed out extraneous files. Is it a valid approach to detect date of last access using the filesystem object?
I could harvest dates of last access from all desktops and then if a file has not been used in x years, feel certain in deleting it.
I would also run checks against all places where there might be code references: scx, prg, vcx, etc.
But I haven't been able to make the filesystem object work.
local fso, f, s
fso = CreateObject("Scripting.FileSystemObject")
filespec = "c:\license.txt"
f = fso.GetFile(filespec)
Crlf = CHR(13)+CHR(10)
s = Uppe(filespec) +CRLF
s = s + "Created: " + f.DateCreated +CRLF
s = s + "Last Accessed: " + f.DateLastAccessed +CRLF
s = s + "Last Modified: " + f.DateLastModified
MESSAGEBOX(S)
This code errors on the line that reads the datelastaccessed property of the file object.
Further, is date of last access a true indicator that a file is unnecessary.
And even further can I count on the scripting host to be available and active.
Your thoughts?
Bill
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement