Author Topic: %%-c  (Read 963 times)

Nexius2

  • Jr. Member
  • **
  • Posts: 15
%%-c
« on: November 25, 2014, 07:23:00 AM »
Hello,
while searching how to skip a well named file with exiftool, I noticed that I have different result.
this is what I do:
Code: [Select]
exiftool -r -v -d %Y-%m-%d_%H-%M-%S%%_c.%%e -"filename<datetimeoriginal" "$line"sometimes, I get date_time_.jpg, sometimes date_time_1.jpg or even date_time%_c.jpg

if I use %Y-%m-%d_%H-%M-%S%%-c.%% it works perfectly. is there some way to have the "_" instead of "-"?

and is there a smart way to check if a filename is ok before renaming it or do I have to script that part?

thanks

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14759
    • ExifTool Home Page
Re: %%-c
« Reply #1 on: November 25, 2014, 08:04:03 AM »
The docs explain this (read about the -w option).  For an underline, you use "%+c".  (not very intuitive, I know)

The smart way to check the file name is to write TestName first to see what the names will be:

exiftool -r -v -d %Y-%m-%d_%H-%M-%S%%+c.%%e -"testname<datetimeoriginal" "$line"

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).