Re: Recursing through folders without changing Last Accessed Date

On Fri, 14 Apr 2006 16:01:11 GMT, harrykrishna.nospam@... wrote in

Don't know if this fits, but have you looked at the registry setting

You are not suggesting that the OP change that setting, reboot, run his
enumeration of directory permissions, change the setting back again and
reboot once more?

I think that LastAccessDate is rather useless and I have always turned
it off, but it's not something that can be done on the fly.

"sd_haf" <> wrote:

Al Dunbar [MS-MVP] wrote:
I don't know how to do that, and suspect that it is not possible if using
the NTFS file system itself. What would be the point of the file system
tracking last access if that the date is not going to represent when the
file was actually last accessed.

But even supposing one could save the date, the action of modifying the
"last access date" would likely be enough to register as an access,
resulting in the field being updated once again.

What I am wondering is: "what is the business case for allowing admins (or
anybody, for that matter) to access files without detection"?

"Geraldo Rosado" wrote in message
"Can you store the "current" last accessed dates to variables and then,
after accessing the necessary stuff, set them back to the originals?
(sorry if this is a stupid suggestion... just a a beginner...)

"sd_haf" wrote:

HI all,
I am writing a script which should enumerate the Folder
permissions of a share. I was successful in doing this until i get a
new requirement which says that the Last Accessed dates should not be

I am using for each subfol in fol.subfolders to get
the subfolder properties (i.e, Path,size) but what i believe is, it is
the culprit which is changing the date. I tried using
Directory.GetDirectory to get the subdirectories but that attempt also
went into vain as it is also doing the same thing.

I tried using GetLastAccessTime and SetLastAccessTime for setting the
earlier time but to give the path as input i need to get it by using
fol.subfolder property only.

Please suggest me in this regard . I need some alternate solution for

Deleting the files which were accessed within 2 years. It would save
lot of space after migration to new system.

Just because a file hasn't been accessed in a period doesn't necessarily
mean it can be deleted. It may well still have documentary/evidentiary
value. Conversely, because the LastAccessdate will be touched by all
sorts of innocuous actions, it does rarely reflect actual usage.

Michael Bednarek "POST NO BILLS"