I run the following command.
exiftool -d %Y.%m.%d(%I.%M.%p) "-testname<${CreationDate}_$ContentIdentifier.%le" "E:\Pictures\IMG_5999.mov"
I only want to use the first 8 chars $ContentIdentifier in the new name of the file.
Any assistance is appreciated.
You would have to use the Advanced formatting feature (https://exiftool.org/exiftool_pod.html#Advanced-formatting-feature) and insert some Perl code, of which there are many ways to do that
For example
exiftool -d %Y.%m.%d(%I.%M.%p) "-testname<${CreationDate}_${ContentIdentifier;s/^(.{8}).*/$1/}.%le" "E:\Pictures\IMG_5999.mov"
Heh, literally the same question from StackOverflow (https://stackoverflow.com/questions/17999860/capture-first-8-characters-perl). You would just use it on the default value of the tag which is $_
exiftool -d %Y.%m.%d(%I.%M.%p) "-testname<${CreationDate}_${ContentIdentifier;$_=substr($_, 0, 8 )}.%le" "E:\Pictures\IMG_5999.mov"
I learned most of what I know of Perl from googling what I want to do and "perl". This is what I used here (https://www.google.com/search?q=perl+first+x+characters+of+variable). Even though I knew I wanted to use substr, I wasn't quite sure of the parameters so I had to double check.
Thanks for the assistance. Used the second option. Works like a charm.