3 Replies Latest reply: Sep 14, 2011 11:59 PM by jallakim
jallakim Level 1 Level 1 (0 points)



Anyone knows a way to rename the filename of screenshots in Lion?


I'm talking about the part that comes after the prefix, that can be changed via;


defaults write com.apple.screencapture name NEWPREFIX


In Snow Leopard, this was achieved by chaning a line in the following file;




This is no longer possible, as the value isn't present in this file anymore. The .strings-file have also been changed from a plain text file, to a binary plist file since Snow Leopard.


The reason I want to change this, is to avoid spaces in the file name. I know that some of you use scripts that goes through the screenshot-folder to rename, but was hoping to avoid this.


Anyone knows of a way to change this in Lion?

MacBook Pro, Mac OS X (10.7), Mid-2009, 2.8 GHz, 8GB RAM
  • jallakim Level 1 Level 1 (0 points)

    So, I've solved this temporarily by using a short bash-script that I run whenever I take a screenshot;


    ls -1 $DIR_TO_FIX | while read file; do
       if echo "$file" | grep -qE "^dump[ ]+"; then
          NEW_FILENAME=`echo "$file"|perl -wple 's, at , ,g;s,\s+,_,g'`
          mv -n "$DIR_TO_FIX/$file" "$DIR_TO_FIX/$NEW_FILENAME"


    Still hoping to find a proper fix for this, though.

  • fu-jyh Level 1 Level 1 (10 points)



    I did following steps to change default screenshoot filename

    $ sudo su

    # cd /System/Library/CoreServices/SystemUIServer.app/Contents/Resources/English.lpro j

    # plutil -convert xml1 ScreenCapture.strings

    # vi ScreenCapture.strings


    <key>%@ %@ at %@</key>

              <string>%@ %@ at %@</string>


    <key>%@ %@ at %@</key>


    # plutil -convert binary1 ScreenCapture.strings

    # killall SystemUIServer


    You can replace "Pictures" to whatever you like.

  • jallakim Level 1 Level 1 (0 points)

    Genious! Thanks!