Changing the screenshot location and format

Anthony Caruana
18 September, 2015
View more articles fromthe author

I need to take a lot of screenshots for Macworld Australia. I typically use the Command-Shift-4 shortcut to grab the part of the screen I need to use.

However, by default, OS X, stores screenshots as .PNG files to the desktop. I prefer to capture them as .JPGs in another folder. Here’s what I’ve done to make sure screenshots land in the folder I want, in the format I prefer.

You’ll need to use the Terminal for this but the commands are pretty easy to execute.

Changing the screenshot location

  1. Launch Terminal from Applications | Utilities (TIP: I use Spotlight with the Command-SPacebar shortcut and then type Termi. That’s faster than mousing and clicking through Finder for me).
  2. Enter the following command at the command prompt:
defaults write location /path/;killall SystemUIServer

Let’s break that down into it’s component parts as you’ll need to make a few small changes to suit your needs.

  • defaults write location  Keep this bit as it is. There’s no need to make any changes.
  • /path/  This is where the magic happens. In my case, I wanted to store screenshots in the Screenshots folder I created in my OneDrive folder which is in my personal home drive. So, instead if /path/ I use
  • ;killall SystemUIServer Keep this bit as it is. There’s no need to make any changes.

It’s important to include the punctuation and other characters.

So, my command ended up being

defaults write location ~/OneDrive/Screenshots/;killall SystemUIServer

Now, whenver I take a screenshot it goes to the Screenshots folder under my OneDrive folder.

Changing the screenshot format

Still in the Terminal, enter the following command to change the screenshot format from the default .PNG to my preferred .JPG

defaults write type jpg

Then type the following and press enter.

killall SystemUIServer

That’s it.

One Comment

One person was compelled to have their say. We encourage you to do the same..

  1. Miracular says:

    I’m wondering, further, how to reformat the date that appears within the automatically generated screenshot filenames. Instead of a date appearing with hyphens and offsetting spaces (e.g., 2015-11-13 ), I’d like to have it formatted with underscores instead (e.g., _2015_1113_). Any idea where the code is located and how to effect a change such as this?

Leave a Comment

Please keep your comments friendly on the topic.

Contact us