• 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: How do you know if the folder is Shared
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do you know if the folder is Shared


  • Subject: Re: How do you know if the folder is Shared
  • From: Robert Poland <email@hidden>
  • Date: Thu, 20 Dec 2012 15:07:33 -0700

All,

Seems like "Finder" doesn't play fair.

If, for instance, the Users folder is marked, in the Get Info, as shared then all of it's enclosed folders will bare the label, on their window as Shared. BUT their Get Info window will show them as not Shared.

Bottom line If I want to detect if the Label is "Shared" I'll have to know, and check, the status of every parent folder in the hierarchy.

Sounds impossible.

On Dec 20, 2012, at 2:05 PM, Robert Poland <email@hidden> wrote:

> Thanks Laine,
>
> Apparently Shared is not the same thing as Shared.
>
> see attached…
>
>
> On Dec 20, 2012, at 1:36 PM, "L. Lee" <email@hidden> wrote:
>
>> Hi Robert,
>>
>> I sent this back to the list, but that was a while ago, and I'm not sure what happened to it. Anyway, here it is.
>>
>> Try throwing your shared folder at this one, Robert. See, it's that final ":"("slash")"/" that often breaks the deal.
>> ------
>> set my_chosen_folder to (choose folder with prompt "Choose a folder to check its sharing status…")
>> set P to quoted form of (characters 1 thru -2 of (POSIX path of my_chosen_folder) as string)
>> if length of (do shell script "/usr/bin/dscl . search /SharePoints dsAttrTypeNative:directory_path" & space & P) is not 0 then
>> 	display dialog "The folder \"" & (name of (info for my_chosen_folder)) & "\"" & space & "is shared." buttons {"OK"} default button 1
>> else
>> 	display dialog "The folder \"" & (name of (info for my_chosen_folder)) & "\"" & space & "is not shared." buttons {"OK"} default button 1
>> end if
>> -----
>>
>> Laine Lee
>>
>> ]On 12/20/12 12:48 PM, "Robert Poland" <email@hidden> wrote:
>>
>>>
>>> On Dec 20, 2012, at 11:15 AM, Axel Luttgens <email@hidden> wrote:
>>>
>>>> Le 20 déc. 2012 à 18:10, Robert Poland a écrit :
>>>>> Hi,
>>>>> Talking about folders…
>>>>> Is there a way to know in a script that the "Shared Folder" line is included in the folder window?
>>>>> Apparently the Get Info "Shared Folder" checkbox is broken. It codes not indicate the status indicated by the window line.
>>>> Hello Robert,
>>>> A quick guess here; assuming P is set to the posix path of the folder you're interested in, perhaps could this one be of some help:
>>>> 	set is_shared to length of (do shell script "/usr/bin/dscl . search /SharePoints dsAttrTypeNative:directory_path " & quoted form of P) is not 0
>>>> Axel
>>>
>>>
>>> Thanks Axel,
>>>
>>> I can't seem to get past "Access not allowed.
>>>
>>>
>>> Robert Poland - Fort Collins, CO
> Robert Poland - Fort Collins, CO
>
>
> <Screen Shot 2012-12-20 at 1.42.00 PM.png>

Robert Poland - Fort Collins, CO




 _______________________________________________
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: How do you know if the folder is Shared
      • From: "L. Lee" <email@hidden>
  • Prev by Date: Re: How do you know if the folder is Shared
  • Next by Date: Re: How do you know if the folder is Shared
  • Previous by thread: Re: How do you know if the folder is Shared
  • Next by thread: Re: How do you know if the folder is Shared
  • Index(es):
    • Date
    • Thread