mkdir /Full/Path/To/Folder
.defaults write com.apple.screencapture location /Full/Path/To/Folder
.- Log out and log back in.
Note: You have to put in the path properly. Using ~ to indicate your home folder will not work. The path must be entered starting from the root of the hard drive. For example, if you wanted to save them to a secondary partition, your path would start with /Volumes/SecondPartition/.
Source :
http://hints.macworld.com/article.php?story=20050824073301844