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
- Open Automator (via Spotlight or Applications folder)
- Choose “New Document”
- Select “Folder Action” and click Choose
- Where it says “Folder Action receives files and folders added to:”, choose:
- ➤ Screenshots (or whatever folder you created)
- In the left sidebar, search for:
- Run Shell Script
- Drag “Run Shell Script” into the workflow area on the right
- Change “Pass input:” to as arguments
- 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)