Re: Tree traversal
Re: Tree traversal
- Subject: Re: Tree traversal
- From: Jon Pugh <email@hidden>
- Date: Wed, 25 Jul 2001 08:31:34 -0700
At 3:24 PM +1000 7/25/2001, David Cardwell wrote:
>
I want to be able to open every folder of every folder a directory with an
>
unknown number of folders and unlock each file.
Here's how I would do it. I use the "walk folders" command from Jon's Commands. It allows me to write an open handler that takes a single file and unlocks it. I put that in a script object so I can pass it to my scripting addition, along with the files you dropped on this script application (don't keep running; no splash screen unless you want one) and it will so what you requested, promptly and without opening any windows.
Or make it open windows, what do I care? ;)
script unlocker
on open (theFile) -- an alias
tell application "Finder"
set locked of theFile to false
end tell
end open
end script
on open (theFiles)
walk folders theFiles with script unlocker
display dialog "Done." with icon note buttons "OK" default button "OK"
end open
Check it out.
Jon