Re: file locking
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