News:

If this site goes down it is because of the crappy DreamHost web hosting: They will disable your "unlimited traffic" web server if a single bot hammers the site with a moderate load.  If necessary, an alternate ExifTool forum page is available at https://sourceforge.net/p/exiftool/discussion/

Main Menu

Changing only Year using AllDates Command

Started by elcinnamonb, February 27, 2015, 10:26:04 AM

Previous topic - Next topic

elcinnamonb

I'm trying to change the year only using the command AllDates.

This is what I think it would look like, but it's not working

-AllDates-='-8:0:0'

I want to change an image, say, from 2011-07-21 at 00-49-36 to 2003-07-21 at 00-49-36

What's the right command?
Otherwise, what's a good command to get this done? Thank you very much.

Phil Harvey

To subract 8 years, use -alldates-="8:0:0 0"

(Here I used double quotes so it will also work in Windows.  The single quotes would only work in Mac/Linux.)

Read here for all the details.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

abalter

I tried it, and it changed all the times to 00:00:00. I also tried just using "YYYY:MM:DD" and got an error.


C:\Users\abalter\Documents\Image-ExifTool-9.88\testimages>exiftool -FileCreateDate="2015:03:05" -FileModifyDate="2015:03:05" *
Warning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in File:FileCreateDate (PrintConvInv)
Warning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in File:FileModifyDate (PrintConvInv)
Nothing to do.

Phil Harvey

I'm confused.  You say that the command I posted changed the times to 00:00:00?  I don't see how that is possible.

Also, in your last post you are now trying to write date/time tags, but you have only specified the date.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

abalter

So here is my experiment:
1) Explicitly set YYYY:MM:DD HH:MM:SS
2) Display to confirm
3) Try to set just YYYY:MM:DD using ="2015:03:05 0"
4) Display to confirm


C:\Users\abalter\Documents\Image-ExifTool-9.88\testimages>exiftool -FileCreateDate="2013:04:05 06:07:08" -FileModifyDate="2013:04:05 06:07:08" IMG_8220.JPG
    1 image files updated

C:\Users\abalter\Documents\Image-ExifTool-9.88\testimages>exiftool -system:time:all IMG_8220.JPG
File Modification Date/Time     : 2013:04:05 06:07:08-07:00
File Access Date/Time           : 2013:04:05 06:07:08-07:00
File Creation Date/Time         : 2013:04:05 06:07:08-07:00

C:\Users\abalter\Documents\Image-ExifTool-9.88\testimages>exiftool -FileCreateDate="2015:03:05 0" -FileModifyDate="2015:03:05 0" IMG_8220.JPG
    1 image files updated

C:\Users\abalter\Documents\Image-ExifTool-9.88\testimages>exiftool -system:time:all IMG_8220.JPG
File Modification Date/Time     : 2015:03:05 00:00:00-08:00
File Access Date/Time           : 2015:03:05 00:00:00-08:00
File Creation Date/Time         : 2015:03:05 00:00:00-08:00


Sorry to keep bugging you!  I just really want to know how to do this.

Thanks, Ari

Hayo Baan

The commands you use and the output they generated is exactly what I would expect. What would you want to see happen instead?
Hayo Baan – Photography
Web: www.hayobaan.nl

abalter

I'm trying to keep the HH:MM:SS of the original file. Parallel discussion going on here

https://exiftool.org/forum/index.php?board=12.0

Maybe you have some insight.

Phil Harvey

Hi Ari,

To keep the original time, you could do this:

exiftool "-FileCreateDate<2015:03:05 ${filecreatedate;s/.* //}" ...

Search for "advanced formatting" in the application documentation for more information.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

abalter