23 September 2009 Tips 33 Comments

Everything you need to know about customizing screen captures

Everything you need to know about customizing screen captures

This post is a response to comment I received about the new screen capture naming conventions in Snow Leopard.

In a recent post, a commenter wondered if there was any way to get screen shot filenames back to how they were in Leopard. After a lot of searching and digging through system folders to find the answer, I discovered a lot of stuff about screen captures.

First it should be known that the correct term (at least in the Mac world) is screen capture. When you take one, SystemUIServer, a background process that controls several aspects of the Mac OS X user interface runs a program located at /usr/sbin/screencapture which has several different options for taking pictures of your screen. For instance, it can take window shots with or without shadow or open the taken picture in Preview. The full list of options can be found on its man page in the Mac OS X Reference Library.

When SystemUIServer triggers a screen capture, it uses a default set of options. Shadows are turned on, the picture is saved to the Desktop in PNG format, etc. Some of these options can be changed by rewriting to screencapture‘s default preferences in ~/Library/Preferences/com.apple.screencapture.plist.

To modify the default preferences for screencapture, paste the following commands in the Terminal.

After setting each property, you must logout or restart SystemUIServer for the changes to take effect. You can do this by entering the following command in Terminal and pressing Enter.

killall SystemUIServer

Disable/Enable window shadow

Window shadows are enabled by default. You can control this setting with the following property. This only applies when taking single-windows screen captures.

Disable

defaults write com.apple.screencapture disable-shadow -bool true

Enable

defaults write com.apple.screencapture disable-shadow -bool false

Change file format

defaults write com.apple.screencapture type <format>

Availible formats are :

  • png (default)
  • pdf
  • jpg
  • jp2 (JPG2000)
  • gif
  • tif (TIFF)
  • bmp
  • pict
  • tga

Change capture folder

The default location is ~/Desktop however, you may change it to any path.

defaults write com.apple.screencapture location <path>

Change the filename

This is where it gets tricky. You may change the name of the file with the property :

defaults write com.apple.screencapture name <string>

However, this only changes the first part of the filename. For example, changing the name to “Picture” will save screen captures as “Picture 2009-09-23 at 2.13.30 PM”. There seems to be no built-in way to revert back to the old screenshot filename although, anything can be achieved with Automator.

I’ve created a Automator folder action that will monitor the Desktop for screen capture files and rename them back to the old format. You can of course modify this to your own liking.

Rename Screen Captures with Automator

Installing the folder action

  • Download RenameScreenCaptures.zip and unzip the file
  • Place “Rename Screen Capture.workflow” in ~/Library/Workflows/Applications/Folder Actions/
  • Right-click on your Desktop folder in your Home directory and select Folder Actions Setup form the Services menu
  • When prompted to  Chose a Script to Attach popup, select Rename Screen Capture.workflowFolder Actions Setup

Now when you take a screen capture, Folder Actions will kick in and renames the file sequentially.

  • tangaw

    Great tip – just what I was looking for. I used to use a modified version of the existing system finder Applescript to rename “Picture” to whatever I wanted providing sequentially named files of whatever I was planning. This became impossible because of the changing file names in snow leopard.

    Top tip and tutorial in Automator.

    Thanks a million

    tangawk

  • Pingback: Snow Leopard Changes – Screen Capture & Screen Recording

  • Name

    I've attempted to use the Automator script to rename the files, yet I've run into a snag. When automator first renames the files, it does so flawlessly. If I then take additional screencaptures, the script runs into an error because it tries to rename the new Screen shot files to Picture 01/02/etc. again. These filesnames already exist, so the action fails. What can I do to make this script rename files starting with the lowest valid name (ie start with Picture 04 if it senses the presence of files named Picture 03, Picture 02, and Picture 01)?

  • i1pro

    The new naming convention in Snow really sucks.. The names are so long that I can't even ready Screenshot… If i wanted the dates before I just looked at the inspector. Seems to me like the typical bad idea of a marketing guy in apple.

    Anyway.. Thanks a lot for this workflow!!

  • i1pro

    The new naming convention in Snow really sucks.. The names are so long that I can't even ready Screenshot… If i wanted the dates before I just looked at the inspector. Seems to me like the typical bad idea of a marketing guy in apple.

    Anyway.. Thanks a lot for this workflow!!

  • Pingback:   Upgrading to OSX 10.6 Snow Leopard by Fishcakes Blog

  • Pingback: Screen Capture Settings in Snow Leopard « DRS Applications Blog

  • http://www.air-jordan-17.com air jordan 17

    It looks good,I have learn a recruit!
    Recently,I found an excellent online store, the “http://www.air-jordan-18.com are completely various, good quality and cheap price,it’s worth buying!

  • mic

    Excellent! Thanks.

  • http://www.louis-vuitton-outlet-store.com louis vuitton on sale

    I like writing, hurriedly, not that you are not

  • http://www.louis-vuitton-outlet-store.com louis vuitton on sale

    I like writing, hurriedly, not that you are not

  • Chrislicata

    It worked. Thanks!!!

  • Dejavu

    Thanks for all this info. I do want to change where the screen caps go. Is there any way to change the resolution of the capture? 72dpi doesn't always cut it for me.

  • Dick

    I was hoping the article would give me a terminal command to replace the
    “space” in the captured filename to a “_” for easier use by unix users

  • Michjunge

    With respect to all the people that prefer the old name, I was actually very happy that Apple changed the name, Picture, to the more descriptive Screen Shot. My now retired digital camera named images “PICTURE_00123.jpg” so I have thousands of files with picture in the name. That made it a challenge to search for a certain screenshot file without being super effective in changing the name manually, immediately.

    Also, the addition of date and time in the file name has made my life so much easier. I tend to make a lot of screenshots during a work day, and this is just very helpful when finding and selecting.

    To me these two changes are some of the best in Snow :-)

  • http://www.vapornation.com/store/home.php Volcano Vaporizers

    Thank you for sharing this.. It's better than camtasia

  • http://twitter.com/mpferd Marco

    very good an detailed description

  • Polarbreeze

    Hi, thanks for the very detailed advice. However, unfortunately the recommended method of changing the file type does not work for me – nor, judging form many posts elsewhere, does it work for many others. No matter what I do, my screen capture file format is stuck at .tiff. I've tried everything – trashing plists etc etc, restarting,whatever. Multiple times. Any ideas?!! Thanks.

  • Pingback: Ask TUAW: iPad books, Android iTunes sync, printing without applications and more : : Are you iPad ING ?

  • Concertboy

    That worked perfectly, thanks! I changed the folder location and the file type. Only comment for others is to make sure to use a space between the command and the type, example: defaults write com.apple.screencapture type (space) jpg.
    Also, when changing the folder location, you can just drag the folder into Terminal and that will automatically put the path in.

  • I82Much

    This is perfect. I've never really used folder actions before, and this gets me back to how I like the screenshot naming.

    My problem is not the long filenames, it's that when you sort them by name, things in the afternoon show up before those taken in the morning! (If they had used military time, e.g. 13 instead of 1 instead, it wouldn't be a problem). If I want date sorting, I'll sort by date. I don't need it in the filename.

  • http://www.machead.info glenk

    Thanks! The tip about changing the folder where screen shots are saved did the trick for me. I have posted a link to this page in forums where others are trying to hash out their screen capture problems with Snow Leopard.

  • Zhanzju

    no this com.apple.screencapture.plist in SL 10.6.6…

  • Larryt

    I installed this Folder Action file and it worked fine.
    However after testing a Java app I am writing, a desktop shortcut to a java .jar file was renamed to Picture 1.jar! I deinstalled the folder actions file and it now works fine.
    I just thought I should mention it in case someone else has an shortcut (alias) to a java .jar file.

  • Pelpinda

    I rather use shotChoice to change the format of a screen capture

  • Pingback: Ask : iPad books, Android iTunes sync, printing without applications and more

  • Friend

    Thank you – That's great !

  • http://twitter.com/kthoms kthoms

    Thanks! This article was really useful. And also my first contact with the Automator.

  • Simons

    Is there any possible way that the file created shows the file extension?! 

  • Pingback: RubberNeck Designs Mac OS: How to Change Screen Shot Save Folder

  • Fredrik Axelsson

    Thanks a lot!

  • Pingback: How Do I Change The Default Screenshot Name In OS X Lion? | Click & Find Answer !

  • Pingback: Fishcakes | Upgrading to OSX 10.6 Snow Leopard