• 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: file "locked" property...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file "locked" property...


  • Subject: Re: file "locked" property...
  • From: Jean-Christophe Helary <email@hidden>
  • Date: Thu, 25 Jun 2015 23:40:23 +0900

Weird, my code works now. I'd say it looks like Finder needed some time to update the file status at that particular moment...

Anyway, apologies for the hassle and thank you for the code that confirmed that I was not doing it wrong.

Jean-Christophe Helary

> On Jun 25, 2015, at 23:06, Alex Zavatone <email@hidden> wrote:
>
> Do you have privs to lock that file?  Does the folder that file is in have privs to lock it?
>
> On Jun 25, 2015, at 9:20 AM, Jean-Christophe Helary wrote:
>
>> I'm using 10.10.3 as well and your code produces the following error:
>>
>> error "Finder got an error: Can’t set file \"Mabinogion:Users:suzume:Desktop:locked_unlocked.rtf\" to true." number -10006 from file "Mabinogion:Users:suzume:Desktop:locked_unlocked.rtf"
>>
>> and the highlighted part of the code is:
>>
>> 	set locked of file tFile to true
>>
>> Jean-Christophe
>>
>>> On Jun 25, 2015, at 21:11, email@hidden <email@hidden> wrote:
>>>
>>> Hi Jean,
>>>
>>> Your request is quite unclear (missing code/ missing os level) that said...
>>>
>>> This is what I have tested under 10.10.3 and is working.
>>>
>>> tell application "Finder"
>>>
>>> set tFile to ((path to desktop folder) & "locked_unlocked.rtf") as string
>>>
>>> --- locked
>>>
>>> set locked of file tFile to true
>>>
>>> --- unlocked
>>>
>>> set locked of file tFile to false
>>>
>>> end tell
>>>
>>>
>>> Best regards,jan
>>>
>>>
>>>
>>>
>>>
>>>> Op 25 juni 2015 om 13:52 schreef Jean-Christophe Helary <email@hidden>:
>>>>
>>>>
>>>> I have a file that has a check in the "Locked" box when you verify its information in the Finder and when I do a "return properties of that_file" I do get a locked:true.
>>>>
>>>> Now, when I do "set locked of that_file to false" and check its properties I do get locked:false *but* the finder does not seem to have received that information and when I verify it in the Finder...
>>>>
>>>> What am I doing wrong ?
>>>>
>>>> Jean-Christophe Helary
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>
>>
>> _______________________________________________
>> 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
>


 _______________________________________________
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


References: 
 >file "locked" property... (From: Jean-Christophe Helary <email@hidden>)
 >Re: file "locked" property... (From: "email@hidden" <email@hidden>)
 >Re: file "locked" property... (From: Jean-Christophe Helary <email@hidden>)
 >Re: file "locked" property... (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: file "locked" property...
  • Next by Date: Re: Double Tell - Tell by Variable Question
  • Previous by thread: Re: file "locked" property...
  • Next by thread: Re: file "locked" property...
  • Index(es):
    • Date
    • Thread