renaming with %c and batch file

Started by BerndE, December 11, 2023, 12:42:02 PM

Previous topic - Next topic

BerndE

Hi everybody,

this is exactly what I was looking for, unfortunately it doesn't work with my expression.
I tried diffferent things...

This works fine, but only  without %-c  and without -ext JPG :
exiftool -d  "%%y-%%m-%%d--%%H%%M%%S.%%%%e" "-filename<createdate" %* -k

adding %-c doesn't work:
exiftool -d  "%%y-%%m-%%d--%%H%%M%%S%-c.%%%%e" "-filename<createdate" %* -k

  CMD message:
C:\Users\BE\Desktop\test>exiftool -d  "%y-%m-%d--%H%M%S%* -k
  NAME
      exiftool - Read and write meta information in files
      ....

adding ext MOV -ext JPG also doesn't work:
exiftool -d  "%%y-%%m-%%d--%%H%%M%%S%.%%%%e" "-filename<createdate" -ext MOV -ext JPG -k

  CMD message:
C:\Users\BE\Desktop\test>exiftool -d  "%y-%m-%d--%H%M%S%e" "-filename<createdate" -ext MOV -ext JPG -k
  No file specified

Maybe anybody can help to get the correct expression with %-c and -ext MOV -ext JPG.
I thought it to be something like this (which doesn't work) ...
exiftool -d  "%%y-%%m-%%d--%%H%%M%%S%%-c.%%%%e" "-filename<createdate" -ext MOV -ext JPG -k

Many thanks,
Bernd

StarGeek

Split from 11+ year old thread.

This is partly FAQ #27, My ExifTool command doesn't work from a Windows .BAT file.  But additionally, the %d/%f/%c/%e variables listed under the -w (-TextOut) option must have the percent signs doubled when used in a -d (-dateFormat) option.  You have done this with %%%%e.  This must also be done as %%%%-c.

See the paragraph under Renaming Examples and the Writing "FileName" and "Directory" tags page.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

BerndE

Thank you very much for your help and I'm really sorry that I overlooked the board rules.

Now this one works fine using a Windows .BAT file:

exiftool -d "%%y-%%m-%%d--%%H%%M%%S%%%%-c.%%%%e" "-filename<createdate" -k %* -ext MOV -ext JPG
Thanks again,
Bernd