Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.

You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.

When trying to keep directory trees in sync between local disks and network drives, it is confusing when some of the folder dates get changed by the move/copy operation. FileSync tools may ignore this but unfortunately my brain does not. When looking at the source and destination directories I'd like the folder 'modified' date/time to reflect the most recently 'modified' file within that folder (tree). If the folder contains subfolders then it would be nice if it walked down the directory tree recursively modifying subdirectory timestamps and taking care of the entire tree. (Only the 'modified' timestamp would be altered)

probably would be best to timestamp check just the files within the folder being viewed. Then when trying to figure out whats different across two dir trees you would know that if the folder dates differ, that the files that differ are at the next level down. This algorithm would then recurse down any discovered subdirectories checking their times to the times of the files found within them. Basically "fixing" the "broken" dates on the entire folder tree.

"Ninotech Date Edit is a shell extension for Windows that enables you to change the date and time (the timestamp) of your files. You can change the created, modified, and accessed date of a file by right-clicking it in the Windows Explorer and choosing Edit Date from the context menu. By selecting multiple files in the Windows Explorer you are allowed to change the date/time of many files in just one action.

On Windows NT4, Windows 2000, and Windows XP you are also enabled to change the time and date of your directories."

Select the start folder, and it will recurse the folder and set it's and all it's subfolders' modifed date/time to the most recently modified file or folder it contains.

Skrommel

[copy or print];MostRecent.ahk; Set folder modifed date/time to most recently modified file it contains.; To run, save this script as MostRecent.ahk, and install AutoHotkey from www.autohotkey.com.;Skrommel @ 2009

#NoEnv#SingleInstance,Force

FileSelectFolder,folder,C:\,3,Select a folder to change the date/time ofTRAVERSE(folder)Return

Thank you Skrommel, that's excellent. That loop is a bit tricky, I definitely wouldn't have been able to come up with it. I forgot about this ask till tonight and was excited to see your solution posted here when I arrived back at this thread. It also got me back looking into AHK scripting, I've really got to find the time to get into this more, it's such a great tool. I made a few tweaks and added an output listing and repost it here. Thanks again!

;MostRecent.ahk; Set folder modifed date/time to most recently modified file it contains.; user selects the top of the folder tree to be processed; only files in the immediate folder being processed effect that folders timestamp decision; all subfolder in the tree are processed as well; To run, save this script as MostRecent.ahk, and install AutoHotkey from www.autohotkey.com.;Skrommel @ 2009

If your folder chain time stamp situation doesn't need repair and you just want to sync folders with subfolders, I've found the sync tool in FreeCommander very simple to use in 2 base folder sync scenario. What I mean is you don't have to sync one source folder with 20 destination folders. You have a folder on the left and one on the right. Sync with or without recursive subfolder sync. Before you commit it shows a window with a display of which files will be copied in which direction and allows you to remove items from the list.

edit: although if you have thousands of files it may be cumbersome. Works well for my needs.