defaults write com.apple.screencapture type png
killall SystemUIServer
defaults write com.apple.screencapture location 'path to the folder you want to save the screenshots in'
defaults write com.apple.screencapture location '/Users/[your username]/Desktop'