Link to home
Start Free TrialLog in
Avatar of ejefferson213
ejefferson213

asked on

NTFS Access Date Directory Entry Changing

I created a Perl script to simply list file sizes and last accessed date.  Low and behold, after running script, the new access date/time shows current.  Why is it changing the date/time (the file isn't being opened, just the directory is being read) and is there a way to stop it?
Avatar of -Q-
-Q-
Flag of Australia image

Because you are accessing the file to check it's date/attributes.

Can you just change your script to use modified date?

If you right mouse click a file in explorer, and go properties, it does the same thing.
Avatar of ejefferson213
ejefferson213

ASKER

That's a good suggestion, I'll try that. However, I'm not opening the file but looking at its attributes through the directory.  I don't understand why Microsoft would change the access date when in fact, I haven't accessed the file.
...but you have, to access the attributes :p
ASKER CERTIFIED SOLUTION
Avatar of -Q-
-Q-
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you for your assistance.  I was hoping this wasn't the case but it is what it is.