Renamin video files .mts on windows 7

Started by fcb38, December 01, 2011, 02:35:53 PM

Previous topic - Next topic

fcb38

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.

Phil Harvey

#1
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.
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

fcb38

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!