We help IT Professionals succeed at work.

Behavior of dirdate -dirfix

ddantes
ddantes asked
on
477 Views
Last Modified: 2014-01-13
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?
Comment
Watch Question

Joe WinogradDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2018

Commented:
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

Author

Commented:
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.
Developer
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2018
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Done!   Thank you for your help, and Happy Holidays!
Joe WinogradDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2018

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

Author

Commented:
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 WinogradDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2018

Commented:
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
Joe WinogradDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2018

Commented:
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

Author

Commented:
Good news.
Joe WinogradDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2018

Commented:
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.

Author

Commented:
Sad, but true...

Author

Commented:
DirDate 6.1 has been released, with the following note:  

DIRFIX mode now sets folder creation date to earlier creation
of any entry.
Joe WinogradDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2018

Commented:
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
Joe WinogradDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2018

Commented:
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

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.