Question Can I freeze the date accessed date of a file in Windows?

brannsiu

Distinguished
Apr 20, 2013
1,073
3
19,285
I find that every time I view a file or folder, even if they are not opened or executed, the last accessed date will be updated.
I'd like to know if it's possible to "freeze" the last accessed date? I do not mean to remove them, I mean to freeze the dates until I want to return to normal.
Anything else I have to pay attention when doing this? Will it affect any other file or cause any system error?
 
Many years ago I wrote a VisualBasic app that I could find and optionally change the Last Accessed dates to whatever I wanted to. It uses the Windows API to manipulate file attributes.
If you use the API to find the dates using programming code, it does not change them.

Very useful for scanning an entire server for a business to see how old files were and thus establish a purging routine of old, unused files.
It was too long ago to be able to offer any help.
 
Indeed what Nine Layer Nige wrote. You can write yourself a script that read the last access date first, then passing the open-file (path to whatever exe-file is supposed to open the file) and then wait some seconds before writing back the last-access-date.

Or a completely different option - just pack the file into a zip or 7z package, then open the file from within winzip/winrar/7zip browser app.
 
I find that every time I view a file or folder, even if they are not opened or executed, the last accessed date will be updated.
I'd like to know if it's possible to "freeze" the last accessed date? I do not mean to remove them, I mean to freeze the dates until I want to return to normal.
Anything else I have to pay attention when doing this? Will it affect any other file or cause any system error?
I'm curious as to the Why...
 
Indeed what Nine Layer Nige wrote. You can write yourself a script that read the last access date first, then passing the open-file (path to whatever exe-file is supposed to open the file) and then wait some seconds before writing back the last-access-date.

Or a completely different option - just pack the file into a zip or 7z package, then open the file from within winzip/winrar/7zip browser app.
Hi. I am not an advanced user. I don't know anything about script.
However, I am willing to learn. Will it be a reliable method? Is it difficult to learn? (I only learn this). Can you suggest some tutorials?
The second method shouldn't work because most of the time if the files are not displayed as "detailed", as soon as they show up in a folder, the accessed date will update immediately. This isn't what I want. I have a few portable hard drives, I want to check the last accessed time of some old files. That's the reason.
 
I'm curious as to the Why...
Purely personal reason and nothing about computer. Still curious?

If you are willing to know my personal story through private conversation, rather than public here, I'm willing to tell. I only want to share it privately.

Also, I hope you are helping me this (and some other issues I have mentioned recently) after you get to know my personal story/reason, of course, you can just listen and go, and I can by no means contract with you. But I need your words.

Thanks for reading.
 
Last edited:
However, I am willing to learn. Will it be a reliable method? Is it difficult to learn? (I only learn this). Can you suggest some tutorials?
First I recommend you do a web search for "vbs manipulate file date", there are examples out there, maybe just not your specific case.

Btw - have you considered disabling the windows saving last accessed date?
ps: seems that only ntfs volumes are affected by this (As I read it, it seems that last accessed time in fat/exfat will not be disabled by this).