• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How to get file dates to change after renaming file in Win7-64?

brocks

Member
Is there some registry switch or something in Windows 7 to make the file dates reflect changes to the names of files?

I'm not talking about adding columns to Windows Explorer; I know how to do that. I'm talking about the basic file information in the WIN32_FIND_DATA structure. It has three date fields:

FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;

If I rename an old file, I would expect at least the Access Time, and maybe the LastWrite time, to be changed. But after I rename a file, neither date is changed when I run VC++ in debug mode, do a FindFirstFile on the directory, and look at the file's WIN32_FIND_DATA structure in the watch window.

Of course I'm using NTFS on Win 7. Any help appreciated.
 
I believe last access updates are disabled by default because of the I/O they incur and relative infrequency that they're used but there should be a registry option to re-enable that.

However, the modify time shouldn't be updated by a rename because you're not modifying the file, you're modifying it's parent directory.
 
However, the modify time shouldn't be updated by a rename because you're not modifying the file, you're modifying it's parent directory.

Thanks, that makes sense. If anyone knows the name of the registry parm I need to change, please post it here.

Update: I think I found it, here.

They also give a command to turn LastAccessTime on and off (restart required):

fsutil behavior set disablelastaccess 0
 
Last edited:
Back
Top