• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Acquiring the Dropbox Folder Path -- was: Re: Error -10000 for one user
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: "Stockly, Ed" <email@hidden>
  • Date: Wed, 27 Apr 2016 00:50:43 +0000
  • Thread-topic: Acquiring the Dropbox Folder Path -- was: Re: Error -10000 for one user

>Olof had indicated that with a two Dropbox setup one would be named
>Dropbox (Personal) and one would be named Dropbox (Business name).
>However on the machine in my dept. that has two Dropboxes her personal
>Dropbox is just named Dropbox and the business one is named Dropbox
>(Comtech).


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



>


 _______________________________________________
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


  • Follow-Ups:
    • Re: Acquiring the Dropbox Folder Path -- was: Re: Error -10000 for one user
      • From: Rick Gordon <email@hidden>
    • Re: Acquiring the Dropbox Folder Path -- was: Re: Error -10000 for one user
      • From: Nigel Garvey <email@hidden>
References: 
 >Re: Acquiring the Dropbox Folder Path -- was: Re: Error -10000 for one user (From: Nigel Garvey <email@hidden>)
 >Re: Acquiring the Dropbox Folder Path -- was: Re: Error -10000 for one user (From: RJay Hansen <email@hidden>)

  • Prev by Date: Re: Acquiring the Dropbox Folder Path -- was: Re: Error -10000 for one user
  • Next by Date: Re: Acquiring the Dropbox Folder Path -- was: Re: Error -10000 for one user
  • Previous by thread: Re: Acquiring the Dropbox Folder Path -- was: Re: Error -10000 for one user
  • Next by thread: Re: Acquiring the Dropbox Folder Path -- was: Re: Error -10000 for one user
  • Index(es):
    • Date
    • Thread