[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 357
  • Last Modified:

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?
0
ejefferson213
Asked:
ejefferson213
  • 3
  • 2
1 Solution
 
-Q-Commented:
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.
0
 
ejefferson213Author Commented:
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.
0
 
-Q-Commented:
...but you have, to access the attributes :p
0
 
-Q-Commented:
One other thing forgot to mention.  Even if this wasn't the case, your on access virus scanner would scan the file as soon as you clicked it anyways, which would access the contents of it to scan it.
0
 
ejefferson213Author Commented:
Thank you for your assistance.  I was hoping this wasn't the case but it is what it is.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now