Re: View every folder of a folder by name
Re: View every folder of a folder by name
- Subject: Re: View every folder of a folder by name
- From: Nigel Garvey <email@hidden>
- Date: Wed, 18 Jul 2001 23:11:52 +0100
Nigel Garvey wrote on Wed, 18 Jul 2001 01:46:56 +0100:
[Fast script snipped]
>
I'd normally avoid using 'entire contents' because of the known problems,
>
but it seems to work OK here.
Sorry - 'entire contents' isn't as reliable as I thought here. Here's
another version of the script which opens the subfolders recursively
(though in sibling batches rather than individually, so it's still
comparatively fast):
set theFolder to choose folder
tell application "Finder"
activate
-- Note and close any existing windows
set whatWasOpen to every container window whose popup is false
if the result is not {} then close whatWasOpen
-- Open the target folder and all its subfolders
open theFolder
my openSubfolders(theFolder)
-- Set all the views at once and close the windows
tell (every container window whose popup is false)
-- 2 is the integer alternative for the 'name' setting
set {view, has custom view settings, zoomed} to {2, true, true}
close
end tell
-- Reopen any previously open windows
if whatWasOpen is not {} then open whatWasOpen
end tell
on openSubfolders(thisFolder)
tell application "Finder"
open thisFolder's folders
repeat with thisSubfolder in (get thisFolder's folders)
my openSubfolders(thisSubfolder)
end repeat
end tell
end openSubfolders
NG