Avatar of ddantes
ddantes
Flag for United States of America asked on

Changing the "created" date for files under specific circumstances

Running Windows 7, I encountered an unexpected issue after converting thousands of .wps files to .docx format -- the modified date for all those .docx files became the date when they were converted from .wps format.  Thanks to experts who participated in previous questions, I've been able to restore accurate modified dates to the time stamps of most of those files.  This question pertains to the "date created" attributes for those files, which are now later than the modified dates.   I would like to set the "created" date equal to the "modified" date for .docx files -- only if the "created" date is later.  The .docx files are distributed among hundreds of subfolders within a single drive.
Windows 7

Avatar of undefined
Last Comment
Joe Winograd

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Joe Winograd

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ddantes

ASKER
I'm trying to perform this task, and so far, nothing seems to be happening.
As a test, I tried to fix the timestamps for around twenty files in a specific folder.  All the files have modified date<created date.  In a command window, I navigated to
V:\My Documents\Archived\Agendas   and then ran the command
DirDate - filefix.    I've attached screen shots of the command window, and the resulting folder details.Command window Folder window with file details
Joe Winograd

You have to give it the <filespec>. So the correct command line is:

dirdate -filefix "V:\My Documents\Archived Documents\Agendas\*.docx"

The quotes are necessary because of the spaces in the <filespec>. Regards, Joe
Joe Winograd

Oh, and if you want to do all of the subfolders, include the -R (recurse) parameter. So it would be:

dirdate -filefix -r "V:\My Documents\Archived Documents\Agendas\*.docx"
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
ddantes

ASKER
OK.  I got it to work, but not within subdirectories, only in the directory which is specified in the command line.  I'll see if adding the "-r" argument handles subdirectories...

It worked in many, but not all, subdirectories.   I find that difficult to understand!
Joe Winograd

Yes, adding the -r will cause it to go into all of the subdirectories.
Joe Winograd

> I find that difficult to understand!

Are you sure? Doesn't make any sense!
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ddantes

ASKER
I agree it doesn't make sense.   Here are screen shots of the command line which was executed, and an example of a subfolder with some .docx files which weren't "fixed."Command line with recursive argumentSome .docx files weren't fixed
See Candidate Invitation.docx and HCA Letterhead.docx properties for examples.
Joe Winograd

Are you sure they're .DOCX files? Maybe they're .DOC files. If so, to get all of them, change the <filespec> from

*.docx

to

*.doc*
ddantes

ASKER
Good call!   They were .doc files, and they are now fixed.
I'm satisfied that this housekeeping issue has been adequately settled.  That's a relief, because sometimes I need to provide the chronology of communications and files, and that was wrecked by my lack of foresight during the .wps to .docx conversion.

If you're still willing to post the program which you developed on the other question, I'd still like to implement it.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Joe Winograd

Glad to hear it! Yes, I'll be happy to post the program at the other question.

I agree with you about the date/time stamp on files...it is a crucial piece of information! I've written numerous macros/scripts that call DirDate to do various operations on file dates, all in the interest of having meaningful date/time stamps on files.