How to rename an image file with its 'Date taken' using a shortcut?

I know that the metadata contains the date the picture was taken. I want to export the photo original and then rename it so that it starts with that date. Can anyone help?



[Re-Titled by Moderator]

Original Title: Hi -- can someone help me to write a shortcut that will rename a photo image file to begin with its "Date Taken" ?.

MacBook Pro 15″, macOS 13.7

Posted on Jun 4, 2025 6:16 AM

Reply
4 replies

Jun 4, 2025 10:27 AM in response to KahnJC

You can use one of these user contributed AppleScripts:


  1. Script: Batch Changing the Title to the Capture Date 2018
  2. Batch Change Title to Capture Date-Description-Padded Sequential Numbers
  3. Batch Change Title to Capture Date-Location-Description-Padded Sequential Number
  4. How to change a photo TITLE to date captured… - Apple Community


The above scripts are from this compilation of user tips: Thematic Index to Photos for Mac related User Tips


I compile the scripts as apps, select the photos and double click on the app to change the Title to the date. Then when you export the file to the Desktop you can choose to use the Title as the new file name.



Jun 4, 2025 10:16 AM in response to KahnJC

The following allows you to select one or more images from the Finder and rename those images in the same location with this format: YYYY-mm-dd_filename.ext by using the Date Taken (e.g. DateTimeOriginal EXIF data).


When you click this link, the Shortcuts application will launch and ask you if you want to install this Shortcut. Very likely, there will be other security related challenges that you will agree to, and you may even need to visit:


System Settings > Privacy & Security panel and also General > Login items & Extensions > Finder i⃝ to enable the DateTimeOriginal Shortcut so you can select your images and right-click on the first image and choose Quick Actions > DateTimeOriginal.


If in the Terminal, the following will rename three DNG images on the Desktop:

cd ~/Desktop
shortcuts run DateTimeOriginal -i IMG_009*.DNG


I have only tested this on macOS Sequoia v15.5 as it is my principal desktop.


Jun 4, 2025 11:25 AM in response to KahnJC

In Photos, the filename has little use and, in fact, it is no longer the actual name of the file. The filename has been changed to a unique identifier so that all the IMG_0123 filenames from different cameras don't get mixed up. So there's no changing of filenames within Photos.


The first two suggestions work only for files that have been exported from Photos, as you asked for.


Old Toad's suggested scripts work within Photos, but they don't change the filename--they change the Title. You can then export the picture with the menu "File>Export>Export nn Photos" and use the Title for the filename.


In fact, with Export, you get other choices, as well:


I do what Old Toad suggests, but I use the 3rd party app  Photos Workbench($30) that lets me add the date and be more descriptive in the title:


The titles show with the thumbnails in Photos, so it seems much more useful to work with titles rather than with filenames.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to rename an image file with its 'Date taken' using a shortcut?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.