Using Touch to Change File Timestamps

To use Touch, you first open Terminal, which is located in the Applications folder, inside the Utilities folder. It's faster to open if you press "Cmd-Space," type "terminal" and press "Enter." Once Terminal is open, locate the file you want to change in Finder.

To change the Modified timestamp to the current date and time, type "touch -m" in Terminal, followed by one space. Then drag the file from Finder into Terminal and press "Enter."

To change the Modified timestamp to any other date and time, use the following format to specify the year, month, day, hour and minute:

touch -t YYYYMMDDhhmm

Your Mac uses a 24-hour clock, so if you want to change the timestamp to January 15, 2021, at 11:50 pm, you type: touch -t 202101152350

Enter a space after the time and drag the file into the Terminal window. Press "Enter" to make the change. To change the timestamps on multiple files to the same date, select them all and drag them all into the Terminal window at the same time.

If you want to change the Created timestamp to one date and the Modified timestamp to another, use the -t attribute twice. For example, suppose you want to change the Created timestamp from January 2020 to 2019, but you want the Modified timestamp to stay as January 2020. Use the -t attribute to change both to 2019 and then use it again for 2020. The Modified timestamp is updated, leaving the Created timestamp at 2019.