Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Changing the "created" date for files under specific circumstances

Posted on 2013-11-23
11
Medium Priority
?
513 Views
Last Modified: 2013-11-23
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.
0
Comment
Question by:ddantes
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
11 Comments
 
LVL 56

Accepted Solution

by:
Joe Winograd, EE MVE 2015&2016 earned 2000 total points
ID: 39672071
Hi ddantes,
One more time for DirDate! Take a look at the readme file in the copy you purchased or look at the PDF file with the doc that I uploaded in one of your previous questions. You will see a parameter called -FILEFIX with the following description:

"If the modified date of a file is earlier than the create date, the create date is set to the modified date."

This is exactly what you are looking for.

Also, I started working on a program for you based on your last question. See my final comment there and let me know if you're interested in pursuing that. Regards, Joe
0
 

Author Comment

by:ddantes
ID: 39672102
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
0
 
LVL 56

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
ID: 39672103
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
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 56

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
ID: 39672112
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"
0
 

Author Comment

by:ddantes
ID: 39672117
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!
0
 
LVL 56

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
ID: 39672119
Yes, adding the -r will cause it to go into all of the subdirectories.
0
 
LVL 56

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
ID: 39672121
> I find that difficult to understand!

Are you sure? Doesn't make any sense!
0
 

Author Comment

by:ddantes
ID: 39672126
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.
0
 
LVL 56

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
ID: 39672129
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*
0
 

Author Comment

by:ddantes
ID: 39672134
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.
0
 
LVL 56

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
ID: 39672145
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.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the features I've come to appreciate about Windows 7 and Windows Server 2008 R2 is the ability to pin applications to the task bar. As useful a feature as I've found this, it does have some quirks.  For example, have you ever tried pinning an…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question