Mac OSX Terminal Failed Defaults Write Command

1.3k views Asked by At

Trying to change the default screenshot directory to a specific folder in my google drive, but when I try the following command

defaults write com.apple.screencapture location ‘~/Users/tommy\Google Drive\Sync\iMac\iMac Screenshots’

I get this error

2014-11-10 21:49:43.644 defaults[2184:76708] Unexpected argument DriveSynciMaciMac; leaving defaults unchanged.

and I don't know what I'm doing wrong.

All help would be appreciated. Thanks!

[IMG]https://i.stack.imgur.com/Uw8c3.png

1

There are 1 answers

0
Ken Thomases On

You are using smart quotes, not ASCII apostrophe characters. Try this:

defaults write com.apple.screencapture location '~/Users/tommy\Google Drive\Sync\iMac\iMac Screenshots'

The path is weird, though. It starts with a tilde (~), which means the user's home directory, but then it continues with what appears to be the absolute path to your home directory (/Users/tommy). You then switch to backslashes which are not valid path separators on OS X. They will either be seen as just another character in a file or directory name or they will be treated as though they "escape" the character that follows.