Re: Recursing through folders without changing Last Accessed Date



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

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

http://technet2.microsoft.com/WindowsServer/en/Library/80dc5066-7f13-4ac3-8da8-48ebd60b44471033.mspx

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" <hafeez.sd@xxxxxxxxx> 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
news:15D04A0B-126A-4A44-937B-6C0F773DDE1F@xxxxxxxxxxxxxxxx
"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
changed.

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
this

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 http://mbednarek.com/ "POST NO BILLS"
.



Relevant Pages

  • Re: ++++++RDP connection++++++
    ... I wasn't suggesting that a reboot would fix the problem but that the ... "Shenan Stanley" wrote: ... What event log should I look for? ...
    (microsoft.public.windowsxp.work_remotely)
  • Re: [SLE] editing root files--didnt help
    ... Do the directory permissions allow write access. ... If not then the file permissions are irrelavant. ... > So I rebooted the machine, and writing to drives is still ... >> reboot? ...
    (SuSE)
  • Re: 10.04 successfull horror story
    ... are the items with which you populate the panels with. ... the GP is suggesting that the OP perform a dangerous operation. ... If you like the results after you reboot then all is well. ... Karl F. Larsen, AKA K5DI ...
    (Ubuntu)
  • Re: Autoupdate Unilaterally Reboots my PCs? What Nerve!!!
    ... > memory or get corrupted or lost without a reboot. ... Not suggesting that the reboot be cancelled entirely, ...
    (microsoft.public.windowsxp.general)
  • How to fix syslog error "Trying to re-exec init"
    ... I just recently installed Fedora 1 Core and have been noticing the ... following syslog error ... The error seems to occur mostly just after 4AM suggesting that it is ... reboot, so it may be caused by something else. ...
    (linux.redhat.misc)