Changing File Creation Date in Newer MacOS

SetFile in Terminal SetFile Command in Terminal by Ben

OK, first off, apologies for a super technical post but this information was not easy to find online (and I looked) so I felt the need to share it here.  I have been doing a lot of technical training lately and I also have been collecting my certifications in order to share on sites like LinkedIn (although they go there right away when I complete a LinkedIn course or post a certificate right away).  Well, it bothered me that one of my Blackbaud Financial Edge Certificates of completion was dated wrong (used today’s date instead of the origination date) and I felt that I had to fix it.  I searched high and low online and there was an older command on MacOS 10.9.x or earlier that worked (Maybe it worked on 10.10.x as well but I’m on 10.14.4 currently).  The old command was touch, syntax format was “touch –t YYYYMMDDhhmm” but this doesn’t work on newer MacOS operating systems.  This screenshot above however did work.

Step 1.  Open Terminal on your Mac located in the “/Applications/Utilities” folder or in “Finder” select “Go” then “Utilities” to find it near the bottom of that window.

Step 2.  Have the file you want to change the date on available near next to the “Terminal” window to make Step 4 easier.

Step 3. Type out (don’t type the “) what you see here below to set the date to August 15, 2018, in this example:
“setfile -m 08/15/2018”

Step 4. Drag the file you want to change the date from the window you opened in step 2 over next to the command you typed in and the Mac will complete the command for you.

Step 5. Press return and the command will run and your date on the file will change.  You can confirm this by clicking on the file and selecting while in the Finder, “File” and “Get Info”

TIP: Typing a command and “-h” after will show you help for the command and the proper syntax to execute what you are trying to do.

Hope this helps you too?

Have any questions or need tips on how to do things on your computer?   This is my day job and something I have been doing for almost 30 years now (I started young).  Let me know by sending me a message!