1

I took a bunch of vacation photos and didn't realize that the camera date was incorrect. The photos all start at Dec 31, 2012 11:00pm, whereas they should start at June 28, 2022 11:42am. I've looked at the touch and SetFile terminal commands, but just can't seem to find a way to recursively add the proper amount of years, days, minutes, to each file to get them to the correct date. Any suggestions?

6
  • So you want to keep the offsets from 12/31/2012, just changing the base, rather than changing them all to the same date and time? This is not clear to me. Jul 7 at 13:56
  • Yes, that is correct. I basically need to add 9 years, 178 days, 12 hours and 42 minutes to all of the files. Jul 7 at 17:48
  • The fine man page for touch(1) describes the -A command-line option. Whether it supports enough of an offset... Jul 7 at 21:44
  • 1
    If you're a programmer this is a fun little exercise. Tcl via the command 'tclsh' can do it. set t0 [file atime "your file name"] set t2 [clock add $t0 9 years 178 days 12 hours 42 minutes] file atime "your file name" $t2 This gets the file's atime, bumps it, and sets it. Repeat for mtime.
    – aMike
    Aug 5 at 23:26
  • @aMike I knew there was a reason I needed to learn tcl. Have an upvote. Aug 13 at 22:12

1 Answer 1

0

The app A Better Finder Attributes, although a bit pricy for some at US$19.95, is an amazing tool for, well, changing file & folder attributes.

Here are screenshots of the date manipulation options:

enter image description here

Additional options under the Action: drop-down:

enter image description here

Note: I'm a satisfied paying user of the apps A Better Finder Attributes and A Better Finder Renamer, and have no financial or other ties to the developer.

3
  • This is the "correct" answer in terms of which software to use, but it would be much clearer if a) the screenshots were the other way round and b) they showed using "Adjust creation and modification dates" (not setting creation date). Better to link to developer publicspace.net/ABetterFinderAttributes/index.html
    – Gilby
    Jul 6 at 23:33
  • I will take a look at the app. But I have to believe that this can be accomplished in Terminal as most of these finder and disk editing apps are merely GUIs for Terminal commands. Jul 7 at 13:58
  • Sure it can be done with a script, but rather than taking days/weeks to get assistance, you could have used ABFA and fixed all the dates in 5 minutes.
    – Gilby
    Jul 7 at 23:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .