Modified Date of Folders in Windows Explorer

We are in the midst of a massive folder reorganization. We have found that when we move a folder to a different folder in Windows Explorer, the moved folder's modified date changes to the current date. No sub-folder or file within the moved folder was modified. The only change was moving the folder to a different parent folder.

How can we change that? Here is what we want:

1) When we move a folder, the date of the moved folder does not change.
2) The modified date of a folder is equal to the most recent file within that folder.
TUMIhqAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

flubbsterCommented:
I believe this is a windows thing by design and I know no way of modifying that behavior. When a folder or file is moved, windows updates the Master File Table (MFT) so it knows where it is located. Hence, the new modified date. There are utilities available to change the modified date, but it would have to be done manually I believe. Will investigate a bit more...
0
Joe Winograd, Fellow&MVEDeveloperCommented:
> 1) When we move a folder, the date of the moved folder does not change.

Use the /DCOPY:T option of ROBOCOPY:
http://ss64.com/nt/robocopy.html

> 2) The modified date of a folder is equal to the most recent file within that folder.

Loop through all folders after copying and use the -DIRNEWEST option of dirdate:
http://www.datamystic.com/dirdate
-DIRNEWEST   Set folder create and modify date to the date of the newest file
As a disclaimer, I want to emphasize that I have no affiliation with DataMystic and no financial interest in it whatsoever. I am simply a happy user/customer. Regards, Joe
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
flubbsterCommented:
Yeah... I thought of robocopy also but the question sounded more like the file is just being moved and not copied via a command line. But, whatever works... lol
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

TUMIhqAuthor Commented:
I am willing to do command line work, and I can train others to do it as well. Thanks for your inpu.
0
Joe Winograd, Fellow&MVEDeveloperCommented:
> I am willing to do command line work, and I can train others to do it as well.

Good to hear! Not everyone is so inclined. You're welcome — happy to help.
0
LeeTutorretiredCommented:
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
0
Joe Winograd, Fellow&MVEDeveloperCommented:
There is definitely enough information to confirm an answer. The author's question is this:
Here is what we want:

1) When we move a folder, the date of the moved folder does not change.
2) The modified date of a folder is equal to the most recent file within that folder.
The author also said this:
I am willing to do command line work, and I can train others to do it as well.
I tested the solution proposed in this post. It meets the author's requirements and works perfectly. That is, (1) the /DCOPY:T option of ROBOCOPY retains the source folder's date on the destination folder and (2) the -DIRNEWEST option of dirdate sets a folder's date to the date of the newest file in the folder. I have confirmed that this is an answer. If anyone cannot get it to work, please let me know and I'll be happy to help you through it. Regards, Joe
0
Joe Winograd, Fellow&MVEDeveloperCommented:
Matt,
Thank you for accepting — very much appreciated! Regards, Joe
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 7

From novice to tech pro — start learning today.