Mac OS X Screenshot save to folder (instead of desktop)

I take a lot of screenshots on my mac.  Sometimes it’s simply the quickest way to save information from a web page or design I’m working on, sometimes it’s because I need to show someone what they should be seeing on their screen when I’m helping them with their computer by email.

Taking a screenshot is so simple on a mac.  Using the three key shortcut “Shift  CMD  4” brings up crosshairs and you can draw the area of the screen that’s of interest.  Easy.  They’re saved to the desktop with the name ‘Screen Shot 2013-08-23 at 16.55.19.png’

Doing so many and not always wanting to delete them immediately was making my desktop a bit of a mess, so I googled for a way of changing where they’re saved. OS X Daily had exactly the answer I was looking for.

Launch Terminal and use the following syntax:

defaults write com.apple.screencapture location /path/

For example, if I want to have the screenshots appear in my Pictures folder, I would use:

defaults write com.apple.screencapture location ~/Pictures/

To have the changes take effect, you then must type:

killall SystemUIServer

Update from the comments: Some have said this only takes effect when they restart their computer.

So I created a folder on my desktop called ‘ScreenShots’, used the code
defaults write com.apple.screencapture location ~/Desktop/ScreenShots/

And it all works perfectly 🙂

screenshot_folder_on_desktop
I wanted to make the folder look a bit different, so quickly created an icon for myself. It’s actually the “icon-camera-retro” from Font Awesome with a white gradient background inside the camera and transparent background. Sure, it won’t win any awards but if you want it, help yourself. Click on the image and you’ll get the standard wordpress image page with a download option (or right-click, save-as as you prefer).

ScreenshotFolderIcon

39 thoughts on “Mac OS X Screenshot save to folder (instead of desktop)”

  1. So i just copy that code into my terminal window and it will work? I did it for the screen shot folder save on desktop and it didnt work…

    1. Assuming you want the screenshots saved in a folder on your desktop, it should be as simple as:

      1) created a folder on my desktop called ‘ScreenShots’
      2) in terminal:
      defaults write com.apple.screencapture location ~/Desktop/ScreenShots/

      If that doesn’t work, do you get any error messages?

      Note: Capitalisation of ScreenShots needs to be the same in both steps (eg: Screenshots in step 1 will not work with ScreenShots in step 2.

  2. going to a more basic level for ultra thickness like me, what is terminal? I don’t understand where to write whatever in…can you help please?

  3. You need to restart the SystemUIServer by using –

    killall SystemUIServer

    Otherwise you can logout and login ance to have it working

      1. Thanks very much for the how-to. Weird thing is that the protocol also seems to support drag’n’drop, except it doesn’t and I couldn’t get it to work for local image files (in both cases you get the icon of the Preview application). Unfortunately the icon doesn’t change if the folder is in the sidebar.

  4. OK, I tried this and now I can’t find my screenshots. They were going to my desktop and I tried to change them to go to my Downloads folder. They aren’t there so I did something wrong. Was I supped to hit Enter between the two commands? I did and I am thinking that is where I went wrong. Too scared to try again without guidance first. Thanks!

    1. defaults write com.apple.screencapture location ~/Downloads/
      (press enter)
      killall SystemUIServer
      (press enter)

      If you use the wrong location, say:
      defaults write com.apple.screencapture location ~/WrongPlace/
      then you can repeat it with the correct location. The command replaces the last setting so repeating it does no harm.

      In case it didn’t appear to work, you could try restarting the computer first just to make sure.
      One final thought, the ~ (tilde) has a special meaning, which is your User directory. EG: ~/Downloads is the same as /Users/steve/Downloads for me. If you missed it off and typed “…location /Downloads/” then you may find your screenshots going to a directory at /Downloads

      1. Awesome directions thank you so much!! I feel so accomplished I’ve never done anything remotely like this. I have to admit I was very intimidated at first from the looks of it, but it worked like a charm! Many thanks

  5. MY TERMINAL WINDOW WILL NOT SAVE ANY COMMANDS I PUT IN IT.

    I’M PUTTING IN: defaults write com.apple.screencapture location ~/Desktop/ScreenShots/

    BUT WHEN I CLOSE IT AND OPEN IT AGAIN, THE COMMAND IS GONE! ANY HELP YOU CAN PROVIDE WOULD BE GREAT, THANK YOU.

    GAYNEL

    1. Hi Gaynel,

      That is correct, put the command in, press return. A new blank line will appear below your command and you can close the Terminal window.
      Put in the next command (killall SystemUIServer) and press return again, or restart your computer for the same effect.
      Screenshots should now go into your screenshot folder.

      Terminal is *not* like a Microsoft Word document and it is *not* like a configuration file so you won’t see all the things typed before when you open it again.

      Try again and post back how you get on.

  6. It irked for me when it didn’t work, but then worked for me only when i restarted my computer! i learn’t something new today. I am a basic user of computer & had no formal training!Thanks a lot!!!

  7. Made my day! For whatever reason, screenshots would almost instantly be deleted from my desktop so I’d never be able to access them, and I’d been using a 3rd-party screen capture tool. I prefer using a dedicated folder, anyway.

  8. Thanks for being so responsive, Steve.
    I have one more for you though. I put in the first command “defaults write com.apple.screencapture location / Users/JUSTIN/Pictures/Screen Shots/ “, press enter, and it says “unexpected argument Shots; leaving defaults unchanged” What am I doing wrong?
    Thanks.

    1. Quick answer: you’ve got a space in your path.
      A: use ‘screenshots’ instead of ‘screen shots’
      B: it might work putting path in quotes, eg …location “/users/path/with space”

      I’ll explain later when I get to a full size computer – answering this from my phone 🙂

      1. Longer answer:
        C: it might also work if you ‘escape’ the space. Space is a special character in a string which normally is the end or next part of your command. From memory, something like “…location /users/path/with space” may work. The in front of the space is the escape character. I haven’t tested this though, so if you try and it works please post back to share with others 🙂

  9. Thanks. I had no problem setting up the ~/Pictures/Screenshots folder and everything worked fine yesterday. But for some reason today, when I take a screenshot it’s not appearing in the folder. It’s there, because when I search for it, it finds it and shows the path to the folder. When I return to the folder, the files have appeared. Any thoughts?

    1. Interesting!
      I’ve had similar experiences over the last year. My current best guess is that ‘Finder’ (sometimes) isn’t refreshing the view of files as soon as the image file is created. However OS X knows it’s there because (as you’ve seen) you can find it by searching and I’ve been able to get the image to use in other programs (eg: attach to email).
      I’ve also found that when the view is set to “Arrange by date added” (so my latest screenshot is at the top of the folder) the image sometimes appears at the bottom in a section labelled “no date”. Later on it will appear in the correct “today” section. I’ve not been able to consistently recreate the problem though so it’s continued to be a minor annoyance. If you work it out (or anyone reading this does), I’d love to know a solution!

        1. No, but the problem is definitely finder not updating the file list promptly. I’ve been able to see the file when I use terminal to view the folder. I found a brute force way of fixing it;
          Option + ‘Click and hold’ the finder icon -> select: relaunch

  10. Thank you so much, my mac desktop was peppered with screenshots that were now annoying and messy. Worked perfectly so have now applied code to all our 6 macs at work 🙂

  11. This tip was the easiest and works perfect for me. Thank you! from #SoldAgent
    defaults write com.apple.screencapture location ~/Desktop/ScreenShots/

    1. Delete them the same as you would delete any file, drag the file(s) to the trash bin.
      If your screenshots are saving to that folder and you would like them to save somewhere else, use the same process as above to choose a new folder you’d like them to save to

      1. Maybe I should loop the pics around themselves, sling ’em around my shoulder and tie up my stuff with a scarf, tie them to a stick, and hoof myself gone?

  12. I have followed the instruction you listed (very helpful btw) but the screenshots are saving to the dedicated folder and my desktop. Same file, two locations. Anyway to just make it save to the Screenshots folder? Thanks!

    1. That’s odd. For me, it only ever saved in one location. I’d suggest the next logical steps to be;
      a) Reboot. Test
      b) Follow instructions above from scratch. Test. Reboot. Test
      c) Follow instructions above but this time use different folder. eg: instead of ‘defaults write com.apple.screencapture location ~/Desktop/ScreenShots/’ try ‘defaults write com.apple.screencapture location ~/Desktop/anothershot/’. Test. Reboot. Test.

      If it hasn’t worked by that point them I’m struggling to think what it could be. I’m not sure if it makes a difference if the destination folder exists before you type the command into terminal, but if you’re at this point there’s no harm in trying. Either way, do post back if it works or not in case someone else has the same problem and you’ve found the solution.
      Thanks

      1. I rebooted twice. Made sure my OS was up to date. Then I started with a fresh folder and followed your instructions, problem solved. Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *