Change file save location
I'm wondering if there is a way to create a script on Mac OS X that will change the default save location for all native Cocoa apps. I don't know where to start, so I am open to any advice on how to do this.
Thanks for any help!
+2 
PF1 
source
to share
      
1 answer
      
        
        
        
      
    
Set the default directory for all applications not previously launched:
defaults write NSGlobalDomain NSNavLastRootDirectory "~/Desktop"
      
        
        
        
      
    
Overwrite all previous locations for apps that were previously launched:
find ~/Library/Preferences -name "*.plist" -exec grep -l NSNavLastRootDirectory {} \; | while read domain; do domain=${domain%.plist} ; defaults write "$domain" NSNavLastRootDirectory "~/Desktop"; done
      
        
        
        
      
    
In both cases, replace "~ / Desktop" with your path. If it contains spaces or tilde, remember to use quotes.
+5 
Nikolai Ruhe 
source
to share