I am looking to rename files based on CreateDate and CreateTime. Is it posable to add a custom Date and Time to filename? The Date format I am looking for is yymmdd and the time format is hmma. I the without any: in the date or time.
Would this command work?
exiftool -d '%Y%m%d''%h%mm$a' '-FileName<${CreateDate;}_$Num_${CreateTime;}_Start%.2nc.%e' "$files"
I don't believe there's a tag called "CreateTime". At least I can't create one with exiftool. Where are you getting the value for this?
If you want to have two different date formats, then you need to use the DateFmt helper function (https://exiftool.org//exiftool_pod.html#Helper-functions). Something like
exiftool '-FileName<${CreateDate;DateFmt("%Y%m%d")}_$Num_${CreateTime;DateFmt("%H%M")}_Start%.2nc.%e' /path/to/files/
Would this put the date and the time form DateTimeOriginal feild?
I was just using your original post as an example. I still don't know where you got this "CreateTime" tag from.
I Thought that there was a Create time.
Could this be used DateTimeOriginal
You can use any tags that you find with this command:
exiftool -s -time:all FILE
- Phil
is this better
exiftool -p "${DateCreated}_$Num_${TimeCreated}_Start.tif" -d %Y%m%d_%H%M%S%%-c /path/to/files/
This is what I want the file name
211027_%Num_100010_Start.tif
OK. So you can use most tags that you find with the command I gave. But it must be a date/time tag. Use DateTimeCreated instead of DateCreated and TimeCreated. Does the DateTimeCreated tag exist in all your files?
Also, I don't know what you are trying to do with $Num in the name.
- Phil
Yes there is a date/time tag in my files. If I cange DateCreated to DateTimeCreated and TimeCreated to DateTimeCreated can I make one have date and the other have just time
$Num I a read Veriable where a user cam example
Echo "Enter a Number"
read Num
I can't help with your $Num (are you on Windows? are you executing this from a batch file? If so, then it is likely %Num%, and all other % characters need to be doubled.)
Quote from: j99mac on October 27, 2021, 01:56:15 PM
If I cange DateCreated to DateTimeCreated and TimeCreated to DateTimeCreated can I make one have date and the other have just time
StarGeek showed you how to do this.
- Phil
This is what he has
exiftool -r '-FileName<CreateDate' -d '%Y-%m-%d/%H_%M_%S%%-c.%%le' <yourFolder>
I am looking for the name to be date_veriable_Time_Start
Quote from: StarGeek on October 27, 2021, 10:17:07 AM
exiftool '-FileName<${CreateDate;DateFmt("%Y%m%d")}_$Num_${CreateTime;DateFmt("%H%M")}_Start%.2nc.%e' /path/to/files/
You'll have to figure out what the exact tag you want to use is and you'll have to figure out the proper context for your variable, but otherwise your command is along these lines.
I get" no writable tag sets" when running the comand
We are going around in circles here. Please read our previous posts