batch renaming by date

hardwarenuts0

Honorable
Oct 8, 2012
10
0
10,510
I have used handbrake to convert all my camcorder files (which were originally in AVCHD).

So now, I have a folder with the following files:

00001.mts
00001.mp4
00002.mts
00002.mp4
00003.mts
00003.mp4
...


The mts files are the original files from the camcorder, and contain all the right dates. The mp4 files on the other hand, all show as being modified/created on the day it's converted.

Is there any way to batch rename the mp4 files to affix the original date on it?

For example

00001.mts
2013-03-15-00001.mp4
00002.mts
2013-03-15-00002.mp4
00003.mts
2013-03-18-00003.mp4

(the dates for the MP4 files comes from the date created for the mts files)
 

andrew_berge

Honorable
Apr 29, 2013
262
0
10,860
It's more tricky because you have to name a file according to a different file's properties, but...

AntRenamer
http://www.antp.be/software/renamer

Here's how i would do it, take your original files, and rename them according to their date, like so: 00001-2013-03-15.mts
Then you'll end up with a file list that looks like this:

00001.mp4
00001-2013-03-15.mts
00002.mp4
00002-2013-03-15.mts
00003.mp4
00003-2013-03-18.mts

If there aren't too many files, you can just copy paste the names from one file to the other, otherwise we'll have to find some way to automate that, too. If you know your shortcut keys well, you can copy the names at a file per second or less.

Next time, just change the names before converting ;)