ExifTool Forum

ExifTool => Newbies => Topic started by: Alyssa on March 17, 2015, 04:47:40 PM

Title: Date format not valid?
Post by: Alyssa on March 17, 2015, 04:47:40 PM
Hello
I've modified a script to work with certain files whose creation date its placed in the first 12 characters of their filenames.
The date format its as follows:

150317212432FileName.jpg
(Year(2 digits)MonthDayHourMinuteSecond)

So in the scipt I defined a custom date format:
-d "%%y%%m%%d%%H%%M%%S"

But somehow it still doesn't read it right,what I am doing wrong?
Title: Re: Date format not valid?
Post by: Phil Harvey on March 17, 2015, 06:42:02 PM
Hi Alyssa,

Unfortunately the -d option only applies when reading.  But luckily your date/time format will almost work as-is.  All you need to do is add the century:

exiftool "-somedatetimetag<20$filename" DIR

(this quoting is for Windows, use single quotes instead on Mac/Linux)

- Phil
Title: Re: Date format not valid?
Post by: Alyssa on March 17, 2015, 06:56:35 PM
Oh nice,its working now,thank you :)