ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: fcb38 on December 01, 2011, 02:35:53 PM

Title: Renamin video files .mts on windows 7
Post by: fcb38 on December 01, 2011, 02:35:53 PM
Hello,

I'm new in this forum. ExifTool is for me the way to rename my videos file that come from my camcorder Sony CX700.
I create a .bat file with this command line:
exiftool "-FileName<dateTimeOriginal" -d "%Y-%m-%d_%H-%M-%S.%%e"

It's working with the GUI but doesn't with the .bat file. I've this answer when I lauch the file:

>exiftool "-FileName<dateTimeOriginal" -d "m-H-S. %e"

There is no renaming.
Is there a problem with windows 7?

Can you help me?

Thank you.
Title: Re: Renamin video files .mts on windows 7
Post by: Phil Harvey on December 01, 2011, 06:37:59 PM
You need to specify which files to rename.  Also, in a batch file all "%" characters need to be doubled, so you would have this in a batch file:

exiftool "-FileName<dateTimeOriginal" -d "%%Y-%%m-%%d_%%H-%%M-%%S.%%%%e" %*

In a .bat file, "%*" represents all of the arguments passed to the batch file (or all files dropped on it).

- Phil

Edit: I should have also suggested adding -ext mts to the command.  If you do this you can drop a folder on the batch file to rename all .MTS files inside the folder.
Title: Re: Renamin video files .mts on windows 7
Post by: fcb38 on December 02, 2011, 03:35:05 AM
Wonderful, It's working perfectly !

I write this:

exiftool "-FileName<dateTimeOriginal" -d "%%Y-%%m-%%d_%%H-%%M-%%S.%%%%e" *.M2T

I'm so happy. THANK YOU!