How do I change the default screenshot name in OS X Lion?

In OS X Lion, when I press cmd+shift+4 and then space, I take a screenshot of an app.

But I use my OS in Spanish, and the screenshot file name is very long with spaces and "(,)" chars.

Captura de pantalla 2011-09-25 a la(s) 15.25.54.png

How can I change the default name of screenshots?


Solution 1:

From Apple discussions:

sudo su
cd /System/Library/CoreServices/SystemUIServer.app/Contents/Resources/Spanish.lpro j
plutil -convert xml1 ScreenCapture.strings
vim ScreenCapture.strings

Change

<key>%@ %@ at %@</key>
          <string>%@ %@ a la(s) %@</string>

to

<key>%@ %@ at %@</key>
          <string>%@ %@_at_%@</string>

Then:

plutil -convert binary1 ScreenCapture.strings
killall SystemUIServer

Solution 2:

Sounds like you want back the old Leopard-style "Picture 1", "Picture 2" conventions. I don't know if that's something you can customize though. At least not while the screenshots are taken.

Changing the part before the date

A little workaround: The following will remove the "Captura de pantalla" part. Open up a Terminal and enter:

defaults write com.apple.screencapture name -string "screenshot"
killall SystemUIServer

Replace screenshot with whatever you want your screenshots to be named.

Changing the whole name

If you know that your screenshots land on the desktop anyway, you can of course create an Automator action that automatically changes screenshot file names when they appear on your Desktop (as a so-called "Folder Action"):

  1. Start by opening Automator.app and selecting "Folder Action" as a new action type

  2. For the target folder, select the Desktop.

    enter image description here

  3. Drag the "Find Finder items" and "Rename Finder items" actions from the left to the right pane

  4. In the first action, search "Desktop", and under the conditions, select files that begin with "screenshot" (or whatever they are called right now) and are of the kind "image"

    enter image description here

  5. For the "Rename Finder items" action, change the type to "Make sequential". Choose a new name for your screenshots.

    enter image description here

  6. Save the workflow under any name. Now, it doesn't kick in instantly, so you'll have to wait a bit before your files are renamed. If you want, you can even tweak this script to move your screenshots to a new folder, convert them, et cetera.

To remove this, right-click your Desktop folder, select "Services", "Folder Actions Setup". Uncheck the folder action or disable them completely.

enter image description here

If you ever want to change your workflow, it's located in /Users/your-username/Library/Workflows/Applications/Folder Actions.

Solution 3:

I've disabled the default shortcuts in System Preferences, and use scripts like:

screencapture -io ~/Desktop/`date '+%y%m%d%H%M%S'`.png