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 01:46:56 +0100
Olivier Berquin wrote on Tue, 17 Jul 2001 15:42:54 +0200:
>
Hi all,
>
>
I would like to view every folder of a folder by name
>
>
I write this, but... must I open every folder
This is fast, but shouldn't be run from OSA Menu. (Watch out for
line-wrap):
set theFolder to choose folder
tell application "Finder"
activate
-- Note and close any existing windows
try
set whatWasOpen to the container of every container window whose
popup is false
close whatWasOpen
on error
set whatWasOpen to {}
end try
-- Open the target folder and all its subfolders
open theFolder
open every folder of entire contents of 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
I'd normally avoid using 'entire contents' because of the known problems,
but it seems to work OK here.
NG