Prompt to Name Screenshots Using Automator in OSX

Naming Screenshots When You Take Them

When you take a screenshot in OSX it is prepended Screen_Shot, timestamped, and put in the default folder. If you’re like me, you then go to that folder and manually rename the file, so that you can send it with a bug report, or comments, or post it to your blog.

This is a relatively minor annoyange, but if you don’t keep on top of things, you will end up with a lot of random files named “Screenshot…” that will make your life confusing, and make finding the right one to post or share a little bit more of a pain.

However, it’s fairly easy to alter the system’s default screenshot behavior.

Credit for this must go to Kyle_Cronin’s 2012 post at blogoverflow which got me 90% of the way here… but was a little bit broken for the current version of Automator. If you follwo Kyle’s instructions using 10.10, you will be re-prompted to rename the file (because at the end of the script, the folder detects a new file and re-runs the script). This behavior was probably different in 10.7 or 10.8 when he first posted.

Anyway, you can follow along with Kyle, and add the following amendments:

1) A second step (after the first step, set variable), to run an apple script with the text “activate.” This will make sure that you focus on the text box where you are prompted to rename your screenshot.

2) Add additional Rename Finder Item actions to append the date and time, including seconds, so that you still have timestamps, and do not end up with non-unique named files.

3) As a final action, the Automator script should Move Finder Items to Desktop (or whever you want your screenshots eventually saved).

Or If You Are Lazy and Want to Copy Me:

Or you can just do the following in console: > mkdir ~/Desktop/Screenshots > defaults write location /Users/$USER/Desktop/Screenshots/

And crib my script from this PDF

Drawbacks/Possible Improvements

This Automator action will take a few seconds to run… making an instant function take a few seconds. That is a signifcant drawback. But I am lazy, and I’m multitasking when I ss things, so I don’t mind.

I’m sure can be improved upon in many ways. If anybody has any ideas on how to speed up the process, or make it niftier, please let me know. I believe the delay is just an automator thing related to anything that takes user input. You might be able to save a lot of time just by making a script that opens the Screenshots folder and focuses on the new item, so you can push return and rename it. That might even be better, as you would be right ther eto locate/email the file as you desire. You could also set destination folder, or append the file to an email client… there are a lot of nifty things you might want to do based on your needs. You might very well want to number the prompts for screenshots (as they are laggy), so if you take a few in a row, you can still easily name each when the prompts finally do pop up.


Finally, although this is relatively benign, and I don’t see how it would ruin anything, follow my instructions and use this at your own risk. If you do not like using it, you can always delete the worflow and revert saving your screenshots to their original directory.