Re: finder - how do I rename/move this?
Re: finder - how do I rename/move this?
- Subject: Re: finder - how do I rename/move this?
- From: Michelle Steiner <email@hidden>
- Date: Fri, 23 Dec 2011 18:10:32 -0700
On Dec 23, 2011, at 2:19 PM, DealTek wrote:
> How do I get your result from ...
>
> set parent_folder to POSIX file "/bu1/bu1a" as alias
> tell application "Finder"
> folders of (parent_folder) whose name begins with "THIS-FOLDER"
> end tell
>
> into a var like:
>
> set FOLDER1 to ...... and your result answer.... ?
>
> --- I tried :
>
> set FOLDER1 to folders of (parent_folder) whose name begins with "THIS-FOLDER"
>
> but it fails...
>
> How do I do it correctly?
set parent_folder to POSIX file "/bu1/bu1a" as alias
tell application "Finder"
set FOLDER1 to folder 1 of (folders of parent_folder whose name begins with "THIS-FOLDER") as alias
end tell
Result:
alias "Dora:bu1:bu1a:THIS-FOLDER_2011-12-22_2245:"
Alternatively, you can omit "as alias" if you want a Finder object instead of an alias:
set parent_folder to POSIX file "/bu1/bu1a" as alias
tell application "Finder"
set FOLDER1 to folder 1 of (folders of parent_folder whose name begins with "THIS-FOLDER")
end tell
Result:
folder "THIS-FOLDER_2011-12-22_2245" of folder "bu1a" of folder "bu1" of startup disk of application "Finder"
-- Michelle
--
Power is the ability to not have to please.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden