Avatar of ddantes
ddantesFlag for United States of America asked on

Behavior of dirdate -dirfix

Recently an Expert introduced me to a utility called dirdate, which helps to correct time stamp errors.  When dirdate -dirfix is applied to a folder, the folder's creation date set to the oldest modified date of any file contained within.  The folder's modified date is set to the newest modified date of any file within.  My question is:  wouldn't it make sense to set the folder's creation date to the oldest creation date of a contained file, instead of the oldest modified date of a contained file?  If so, is there a method for accomplishing that?
Windows 7Software

Avatar of undefined
Last Comment
Joe Winograd

8/22/2022 - Mon
Joe Winograd

Aloha David,

> wouldn't it make sense to set the folder's creation date to the oldest creation date of a contained file

That's exactly what DirDate does. Here's a verbatim quote from its readme file:

-DIRFIX   Set the folder create date to oldest file, modify date to newest file

Regards, Joe
ASKER
ddantes

Hi Joe:  Glad to hear from you.  Yes, it sets the create date to the oldest file.  But not to the "create date" of the oldest file.  Instead, it uses the "modify date" of the oldest file.  That is the reason for my question.
ASKER CERTIFIED SOLUTION
Joe Winograd

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
ddantes

Done!   Thank you for your help, and Happy Holidays!
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Joe Winograd

Please post back here when you hear from the DirDate folks. I will do the same. Happy Holidays to you, too!
ASKER
ddantes

Simon, from DataMystic, says that the feature I am requesting was not the original intent, but it would be an improvement.  He plans to add it to a new release, expected to be available by early January.
Joe Winograd

That's excellent news! I received the same "next release" comment, and it wasn't a "maybe"...it was a "we will". But I didn't get a time frame, so great to know that it's early next month, just a few weeks away! Thanks for the update. Regards, Joe
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Joe Winograd

Hi David,
Wanted to let you know that I just got an email from Simon at DataMystic that says, "Early Jan. Let me know if I can help further." So at least we're both getting the same story. :)   Aloha, Joe
ASKER
ddantes

Good news.
Joe Winograd

Interesting how nimble a small company can be. Imagine how long it would take for a large software company to respond to a request like this, whether bug or feature.
Your help has saved me hundreds of hours of internet surfing.
fblack61
ASKER
ddantes

Sad, but true...
ASKER
ddantes

DirDate 6.1 has been released, with the following note:  

DIRFIX mode now sets folder creation date to earlier creation
of any entry.
Joe Winograd

Very nice! I had not seen the 6.1 announcement, so thanks for the heads-up. I'm amazed at the company's rapid response. Great stuff! Regards, Joe
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Joe Winograd

Hi David,
Just a quick note to let you know of a bug in DirDate's context menu [DirDate fix folder dates]. The bug wasn't introduced in 6.1, but testing that new release brought it to my attention (the bug has probably been around for a while). When you right-click on a folder in Windows Explorer or Total Commander (or any file manager) and select [DirDate fix folder dates], the registry entry is sending this command:

"C:\Program Files\DataMystic\DirDate\DirDate.exe" -r -DIRFIX "%1"

The problem is that Windows sends the folder name in the %1 variable without a backslash. This does not work in DirDate with the -DIRFIX option, which requires a backslash on the folder name. I reported it to Simon (along with two suggestions on how to fix it) and he wrote back, "will fix for next release." I don't know which suggestion he'll implement – one is better than the other (more general), but harder to do.

In the meantime, if you'd like to fix it on your own (with the simple, less general fix) and are comfortable with changing the registry, find this key:

HKEY_CLASSES_ROOT\Directory\shell\DirDate\command

and change its value to:

"C:\Program Files\DataMystic\DirDate\DirDate.exe" -r -DIRFIX "%1\"

In other words, simply add the missing backslash after %1. I did this and it now works fine. This bug is probably not affecting you, since your usage of DirDate -DIRFIX is from the command line, so you no doubt have included the backslash (or it wouldn't be working for you), but I figured I'd let you know, anyway. Regards, Joe