Screenshot Filename Automatic Rename

I was looking through older posts on how to change the default filename for screenshots. Something that would be a great system setting to allow us to create the string structure we'd prefer to use, and maybe even create dynamic elements that can be modified based on app or other scenario.


I went to ChatGPT to get help. After I was able to set up an automatic rename using Automator I asked ChatGPT to provide the detailed step-by-step instructions along with a prompt recommendation for anyone who wants to do this. The nice thing is you don't need to be technical in order to do these changes.


The example modified filename is what I use, but the nice thing is you can pretty much make up your own version that works for you.


📸 How to Auto-Rename Mac Screenshots with Custom Date Format Using Automator


If you want your Mac screenshots to have cleaner, more useful names (like SS_250418_11-45-23.png), here’s exactly how to do it using Automator and a folder action.


âś… Step 1: Create a Dedicated Folder for Screenshots (Optional)


You can keep things tidy by directing all screenshots to a specific folder.


Open Terminal and run:


mkdir ~/Screenshots
defaults write com.apple.screencapture location ~/Screenshots
killall SystemUIServer

All new screenshots will now save to your Screenshots folder in your home directory.


âś… Step 2: Set Up the Auto-Renaming Workflow in Automator


  1. Open Automator (via Spotlight or Applications folder)
  2. Choose “New Document”
  3. Select “Folder Action” and click Choose
  4. Where it says “Folder Action receives files and folders added to:”, choose:
  5. ➤ Screenshots (or whatever folder you created)
  6. In the left sidebar, search for:
  7. Run Shell Script
  8. Drag “Run Shell Script” into the workflow area on the right
  9. Change “Pass input:” to as arguments
  10. Paste the following code into the script box:


for f in "$@"
do
  dir=$(dirname "$f")
  ext="${f##*.}"
  newname="SS_$(date -r "$f" +"%y%m%d_%H-%M-%S").$ext"
  mv "$f" "$dir/$newname"
done


Go to File > Save, name it something like Rename Screenshots, and you’re done!


🚀 Example Output


After this is set up, your new screenshots will be named like:


SS_250418_11-45-23.png


That’s:


SS = prefix (you can change this to whatever you want)

250418 = YYMMDD format for the date

11-45-23 = HH-MM-SS format for the time


đź’¬ Want to Customize It Even More?


Use this ChatGPT prompt:



“I want to automatically rename my Mac screenshots using Automator. I'd like the filenames to use this format: SS_YYMMDD_HH-MM-SS.png. Walk me step-by-step through setting up the folder action, including any Terminal commands I might need.”

Mac mini (M2 Pro, 2023)

Posted on Apr 18, 2025 10:05 AM

Reply
Question marked as Top-ranking reply

Posted on Apr 18, 2025 10:30 AM

Even simpler is if you don't care about any of the date/time and just want to change the name used and have them followed by incremental numbers automatically, all you need to do is go to Terminal and type this replacing the name you want to use in the quotes:

defaults write com.apple.screencapture name "Screenshot"


The results are:

Screenshot

Screenshot 1

Screenshot 2

Screenshot 3


To revert back to the default format:

defaults write com.apple.screencapture "include-date" 1; killall SystemUIServer


That is it, just one line to type in the Terminal app, nothing more needed.


1 reply
Question marked as Top-ranking reply

Apr 18, 2025 10:30 AM in response to SpencerjHarris

Even simpler is if you don't care about any of the date/time and just want to change the name used and have them followed by incremental numbers automatically, all you need to do is go to Terminal and type this replacing the name you want to use in the quotes:

defaults write com.apple.screencapture name "Screenshot"


The results are:

Screenshot

Screenshot 1

Screenshot 2

Screenshot 3


To revert back to the default format:

defaults write com.apple.screencapture "include-date" 1; killall SystemUIServer


That is it, just one line to type in the Terminal app, nothing more needed.


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.

Screenshot Filename Automatic Rename

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