• 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 locking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file locking


  • Subject: Re: file locking
  • From: Stefan Eriksson <email@hidden>
  • Date: Thu, 21 Apr 2005 22:35:21 +0200

Here is some code that i use for locking/unlocking files, just change the "set the locked of thisItem to " to true if you wanna lock the files.

Hope this helps.

/ Ster

on
open theFolder
repeat with thisItem in theFolder
theFolder) of me
end repeat
end open

on run
tell application "Finder"
display dialog ¬
"Drag files on me to unlock files" with icon 1 buttons {"Ok"} default button 1
end tell
end run

on theFolder)
tell application "Finder"
activate
set theseFolderItems to every item in theFolder
repeat with thisItem in theseFolderItems
if kind of thisItem is not "Folder" then
set the locked of thisItem to false
else
my thisItem) -- recursive
end if
end repeat
end tell
end setUnlock



On Apr 21, 2005, at 9:01 PM, email@hidden wrote:

Message: 9
Date: Thu, 21 Apr 2005 14:47:17 -0400
From: Bob Cuilla <email@hidden>
Subject: file locking
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; format=flowed

does anyone know how to lock a file ( or unlock it) using applescript?

thanks

bob
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: file locking
  • Next by Date: Mail scripting
  • Previous by thread: Re: file locking
  • Next by thread: Mail scripting
  • Index(es):
    • Date
    • Thread