Re: Setting Finder Preferences and Folder Views
Re: Setting Finder Preferences and Folder Views
- Subject: Re: Setting Finder Preferences and Folder Views
- From: Nigel Garvey <email@hidden>
- Date: Thu, 21 Feb 2002 13:40:34 +0000
"Gregory Smith" wrote on Wed, 20 Feb 2002 10:20:37 -0800:
>
Is there any way to set the Finder Preferences labels using AS and/or
>
setting the 'view' item order (left to right) of a folder?
I assume you mean the column order in 'list' view here. I don't know of
any way to script the changing of this in an existing folder, but when
creating new ones, it's possible to take advantage of the fact that when
a new folder's created, it takes on the characteristics of the folder in
which it's created. (At least, it does on my machine.) You can manually
set up a "nursery" folder somewhere, and then script the creation of new
folders in this, which are then moved to the required location.
I've implemented the idea here as a folder action that's triggered when
the nursery folder's double-clicked, but it can easily be adapted. One
enhancement might be to select an existing folder (using 'choose folder'
instead of 'choose file name'), create another folder with the same name
in the nursery, move the existing folder's contents to the new folder,
then replace it with the new folder. It wouldn't take as long as it
sounds. :-)
on opening folder thisFolder
tell application "Finder"
close thisFolder
-- 'choose file name' was 'new file' before AS 1.(6?)
set newFolder to (choose file name with prompt "Save the new folder
as...?") as string
set AppleScript's text item delimiters to {":"}
set folderName to newFolder's last text item
set newHome to newFolder's text 1 thru text item -2 & ":"
set AppleScript's text item delimiters to {""}
make new folder at thisFolder with properties {name:folderName}
move the result to folder newHome
open the result
end tell
end opening folder
NG
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.