ExifTool Forum

ExifTool => Newbies => Topic started by: Nexius2 on November 25, 2014, 07:23:00 AM

Title: %%-c
Post by: Nexius2 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:
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
Title: Re: %%-c
Post by: Phil Harvey 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