Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bulk File Date Change Based On Other Files

Status
Not open for further replies.

woetech

Programmer
Mar 13, 2009
26
US
Hello,

I have a bunch of old personal HD movies from a video camera that I took back in 2008/2009. They are in a raw AVCHD format and I'm currently converting all of them into a H.264 (.mp4) format to not only save space but to be able to play from different devices. The conversion has been working great, but one thing I just realized is that now all of the created/modified times on the new files are recent dates. With this, I will not be able to tell when I originally recorded the videos if I decide to delete the old raw files. What I want to do is change the time/date on the new converted files to be the same as the time/date on the old ones. All of the files have the same name, only the extension has been changed.

I guess my question/suggestion is, would this be possible with a certain tool/program or possibly with some command-line/batch file wizardry? Or maybe something else already built into Windows 7 that I don't know about that can do this? I just need to change the attributes on the new files based on the attributes on the old files.

Thank you for your help. I know this may not be fully related to this forum but I wasn't sure where else to post. I appreciate any advice. :)

I'm here to help. :)
 
Hello,

Thank you but I already understand that. I know of and have used some file date/time changing utilities, but none of them had the ability to 'mirror' or 'copy' the time/date of one file to another.

I have a huge list of converted videos, probably around 200, with the old raw versions being .mts and the new converted ones being .mp4. Old and new have the same name, so 000001.mts and 000001.mp4 are the same video. The .mts has the date/time I need to be copied to the .mp4 file.

Based on what I need, do you know of a utility that can help? Thanks again.

I'm here to help. :)
 
@ChrisHirst
Thank you, I've heard of these, but I'm curious: How do I use either tool to do what I need? Again, I don't need to simply change the date/time of files, I need them changed on very specific criteria. Please read my other reply above for further clarification.

Thank you.

I'm here to help. :)
 
One way would be to run through the original files and and produce a text file with the details (dir >> list.txt), clean it up as necessary with a text editor that supports regular expression search and replace, then use that to run a batch change on the new files.










Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Ah ha, yes, that would make sense. :) Thank you. I will try that once I have some time later.

I'm here to help. :)
 
Do you have MicroSoft Office, like Word, Excel, etc.?
If so, you may want to try to write your own little VBA program (It is not that difficult, if you are willing to do some work, with help from here)

Take a look at some 'ready-to-use' code from here (go down to SetFileDateTime portion)

Have fun.

---- Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top