Re: Acquiring the Dropbox Folder Path -- was: Re: Error -10000 for one user
Re: Acquiring the Dropbox Folder Path -- was: Re: Error -10000 for one user
- Subject: Re: Acquiring the Dropbox Folder Path -- was: Re: Error -10000 for one user
- From: Rick Gordon <email@hidden>
- Date: Wed, 27 Apr 2016 13:34:04 -0700
And the paths in the jsons are to the actual location, not the location
of the symlink.
---------------------
On 4/27/16, 1:30 PM, Rick Gordon wrote:
On my computer, I have 2 dropboxes, and there are 2 hidden folders,
each containing its own info.json, along with other items.
~/.dropbox and ~/.dropbox-Team/.dropbox
In my case the visible Dropbox folders are located on a non-boot
drive, and have symlinks as ~/Dropbox and ~/Dropbox-Team.
Rick Gordon
---------------------
On 4/26/16, 5:50 PM, Stockly, Ed wrote:
Since the name is included with the path, this script doesn't care what
the name is, and should work even if there are more than two (which,
apparently, is possible).
set dropBoxJsonFile to "~/.dropbox/info.json"
tell application "System Events" to set dropBoxJsonFile to POSIX path of
disk item dropBoxJsonFile
set dropBoxInfo to read dropBoxJsonFile
set AppleScript's text item delimiters to {"{\"path\": \"", "\",
\"host\":
"}
set dropboxPaths to text items of dropBoxInfo
set dropBoxPathList to {}
repeat
if the (count of dropboxPaths)< 2 then exit repeat
set dropboxPaths to the rest of dropboxPaths
set the end of dropBoxPathList to item 1 of dropboxPaths
set dropboxPaths to the rest of dropboxPaths
end repeat
return dropBoxPathList
___________________________________________
RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________
WWW: http://www.shelterpub.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
___________________________________________
RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________
WWW: http://www.shelterpub.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden