Date format not valid?

Started by Alyssa, March 17, 2015, 04:47:40 PM

Previous topic - Next topic

Alyssa

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?

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Alyssa

Oh nice,its working now,thank you :)