General information
Category:
ActiveX controls in VFP
Title:
File system object and date of last access
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only