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

Process nested folders


  • Subject: Process nested folders
  • From: Brad <email@hidden>
  • Date: Mon, 04 Dec 2000 10:59:07 -0800

Hello,

I have a folder hierarchy for which I want to set window properties.
Below is a script that works if I drag group of folders onto it.
What I am looking for is to be able to drag the parent folder
to the droplet and process all nested folders.

I have adapted this script from AppleScript help modules.

**************

-- This droplet processes folders dropped onto the applet
on open these_items
repeat with i from 1 to the count of these_items
set this_item to item i of these_items
set the item_info to info for this_item
if (alias of the item_info is false) and ,
(folder of the item_info is true) then
process_item(this_item)
end if
end repeat
end open

-- this sub-routine processes folders
on process_item(this_item)
-- NOTE that the variable this_item is a folder reference in alias
format
-- FOLDER PROCESSING STATEMENTS GOES HERE
tell application "Finder"
activate
open this_item
set position of container window of this_item to {100, 100}
set size of container window of this_item to {400, 400}
set view of container window of this_item to name
close this_item
end tell
end process_item

***************

Thanks,

Bradley Giesbrecht


  • Prev by Date: Quitting an Applet II
  • Next by Date: Re: FindFile
  • Previous by thread: Re:Quitting an Applet II
  • Next by thread: Re: Process nested folders
  • Index(es):
    • Date
    • Thread