Mac OSX Terminal Failed Defaults Write Command

Joined
Nov 10, 2014
Messages
2
Reaction score
0
Points
1
Trying to change the default screenshot directory to a specific folder in my google drive, but when I try the following command

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

I get this error

Code:
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!

PLeHlOQ.png
 
Joined
Nov 28, 2007
Messages
25,564
Reaction score
486
Points
83
Location
Blue Mountains NSW Australia
Your Mac's Specs
Silver M1 iMac 512/16/8/8 macOS 11.6
And this is on what model iMac, and what operating system?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Your slashes are facing the wrong way in that path. You need / all throughout. ;)
 
Last edited:
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
You have a double escape where you only need one. Try:
defaults write com.apple.screencapture location ~/Users/tommy/'Google Drive'\Sync\iMac\'iMac Screenshots'
EDIT: Sorry, meant an escape inside an escape and in the wrong place. That first \ closed the escape and bash didn't know what to do with the second space in iMac Screenshots.
 
Last edited:

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top