Command line and power tools
Sometimes the timestamp is wrong and the file is right — scans dated by the scanner, photos dated by the copy.
touch -mt 202503151430 report.pdf # 15 Mar 2026, 14:30... format: YYYYMMDDhhmm
touch -t 202503151430 report.pdf # sets access time too
Reference another file's date instead of typing one:
touch -r original.pdf copy.pdf
touch cannot move a creation date earlier (macOS adjusts it only if the new mtime predates it — setting an older mtime does drag creation back with it, which usually is what you want). For explicit control, Xcode's tools ship SetFile:
SetFile -d "03/15/2026 14:30:00" report.pdf # creation
SetFile -m "03/15/2026 14:30:00" report.pdf # modification
SetFile requires the Command Line Tools (xcode-select --install) and is formally deprecated but still present and functional.
Image dates live in EXIF metadata inside the file, and photo apps trust EXIF over filesystem dates. Rewriting those:
brew install exiftool
exiftool "-AllDates=2019:07:04 12:00:00" IMG_2041.jpg
exiftool is the standard; it can also copy dates between files and shift whole folders by an offset (the camera-clock-was-wrong fix).
Correcting scanner output dated today for a 2019 document; restoring dates mangled by a copy through a date-flattening filesystem; making a batch of exports sort in intended order. Search and Smart Folders filter on these dates — fixing them is what makes date-based search tell the truth.
touch -mt YYYYMMDDhhmm file — or -r to copy another file's timestamp.
Edit the EXIF, not the file dates: exiftool's AllDates tag is what photo apps read.
Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.
Download for Mac