I would like to rename my files as follows
Year-Month-Day-HourMinuteSecond-SubSec
2017-07-30-123007-037
If no subseconds I would like to have ### instead.
So far I have this for everything but the subseconds.
-d %Y-%m-%d-%H%M%S-.%%e "-testname<DateTimeOriginal"
You want literally "###" ?
If so, this should do it:
exiftool -d %Y-%m-%d-%H%M%S- "-testname<${DateTimeOriginal}-###.%e" "-testname<${DateTimeOriginal}${subsectimeoriginal;$_=substr($_.'000',0,3)}.%e" DIR
Some trickery was necessary to be sure SubSecTimeOriginal was 3 digits.
- Phil
Sorry yes I want ###. That's what I use when the subseconds aren't known. Is there a way to make it greater than or equal to 3 digits for the subsecs.
For >= 3 digits you could do this:
"-testname<${DateTimeOriginal}${subsectimeoriginal;$_.='0'x(3-length)}.%e"
- Phil