Changing File Dates on a Mac

How to change the date of a file

To change either the created or modified date for a file, you need to use Terminal. It’s not difficult, and you’ll need only one command, but it’s important to get the formatting right. The date and time format for each method is different, so make sure you use the correct one.

To change the created date:

  1. Launch Terminal.
  2. Type the command: SetFile -d ‘MM/DD/YYYY hh:mm:ss’
  3. Replace ‘MM/DD/YYYY hh:mm:ss’ with the date and time you want to set for the created date and time so, for example, 24 March 2022 would be ’03/24/2022’ and 10:05am would be ’10:05:00’
  4. Type a space.
  5. Drag the file which date you want to change onto the Terminal window.
  6. When its file path appears, press Return.

To change the modified date:

  1. In Terminal, type: touch -t YYYMMDDhhmm

  2. Replace ‘YYYMMDDhhmm’ with the date and time you want to change to.

  3. Press the spacebar.

  4. Drag the file whose date you want to change onto the spacebar.

  5. Press Return.