Hi!
I searched by forum about my issue, but found nothing
also didn't find in examples
so... =)
I have 2 files
IMG_1011.jpg
IMG_1012.jpg
but with same DateTimeOriginal 2022:03:24 11:44:05 in both files.
How to rename files into this format IMG_20220324_114405.jpg
-d "IMG_%%Y%%m%%d_%%H%%M%%S.%%%%e" "-filename<DateTimeOriginal",
but if DateTimeOriginal is duplicates- to do step to 1 second
i mean second filename will be 06 second
IMG_20220324_114406.jpg
thanks in advance!
The normal procedure would be to add a copy number to the filename
-d "IMG_%%Y%%m%%d_%%H%%M%%S%%%%-c.%%%%e"
which would give you
IMG_20220324_114405.jpg
IMG_20220324_114405-1.jpg
You can't do editing on the percent variables like you can with the tag variables. Just the string manipulations as shown under the -w (-TextOut) option (https://exiftool.org/exiftool_pod.html#w-EXT-or-FMT--textOut).
I can't really think of a way to do this directly. You could run a second command that would take all the files with a copy number and manipulate the Filesname tag, but then you run into the problem of what to do if there's a duplicate following that. For example, you have two files with a time stamp of 2022:03:24 11:44:05 followed by one with a time stamp of 2022:03:24 11:44:06. That would lead you to requiring that the second time stamp be increased to 2022:03:24 11:44:07, which again could be a problem if there already a file with that value.
If you don't want to use a copy number, you might instead look to see if the camera saves to SubSecTimeOriginal and instead include that as part of the name. It would require moving the extension to the tag copy part.
-d "IMG_%%Y%%m%%d_%%H%%M%%S" "-filename<${DateTimeOriginal}.$SubSecTimeOriginal.%%e"
Quote from: StarGeek on May 21, 2023, 12:03:31 PMThe normal procedure would be to add a copy number to the filename
-d "IMG_%%Y%%m%%d_%%H%%M%%S%%%%-c.%%%%e"
which would give you
IMG_20220324_114405.jpg
IMG_20220324_114405-1.jpg
...
maybe another option?
can be setted DateTimeOriginal with step for all files in DIR?
Quote from: lmiol on May 21, 2023, 03:55:09 PMQuote from: StarGeek on May 21, 2023, 12:03:31 PMThe normal procedure would be to add a copy number to the filename
-d "IMG_%%Y%%m%%d_%%H%%M%%S%%%%-c.%%%%e"
which would give you
IMG_20220324_114405.jpg
IMG_20220324_114405-1.jpg
...
maybe another option?
can be setted DateTimeOriginal with step for all files in DIR?
I found this one solution https://exiftool.org/forum/index.php?topic=12465.0
will explore today
Quote from: lmiol on May 23, 2023, 10:00:12 AMI found this one solution https://exiftool.org/forum/index.php?topic=12465.0
will explore today
Yes, it helps
exiftool -Overwrite_Original -P -fileOrder Filename "-datetimeoriginal+<0:0:${filesequence;$_*=1}" TEST}then i renamed files =)
Quote from: lmiol on May 23, 2023, 12:41:16 PMexiftool -Overwrite_Original -P -fileOrder Filename "-datetimeoriginal+<0:0:${filesequence;$_*=1}" TEST}
You can just use
"-datetimeoriginal+<0:0:$filesequence"The
$_*=1 part means take the value of
FileSequence and multiply it by one, which is no change. The original post was multiplying by 10.