Re: Selecting a file by creator
Re: Selecting a file by creator
- Subject: Re: Selecting a file by creator
- From: Pier Kuipers <email@hidden>
- Date: Wed, 25 Apr 2001 17:15:48 +0100
The problem is that you're telling the finder to use a folder which
has been set by a "tell" statement to another application. In other
words, your tell statements are in the wrong place. The only
application that needs to be told anything is the Finder, but it
needs to know more than the name of the folder to place the Searches
in - it also needs to know where to get the files from. In other
words:
tell application "Finder"
set theStartFolder to (choose folder with prompt "Move from here...")
set theChosenFolder to (choose folder with prompt "To here...")
select (every file of theStartFolder whose creator type is "CSOm")
move selection to theChosenFolder
end tell
ope this helps!
>
I am trying to create a script that will allow me to move all files
>
that are created by an Application (Eudora) to a folder that I
>
select. The script does not seem to recognize the files. I tried
>
it with a different creator code for a BB Edit file and it still
>
does not recognize the files so I know it must be in my syntax.
>
>
tell application (path to frontmost application as text)
>
set the chosen_folder to (choose folder with prompt "Folder
>
to place Searches in
>
")
>
end tell
>
tell application (path to frontmost application as text)
>
tell application "Finder"
>
activate
>
select (every file whose file creator is "CSOm")
>
move selection to chosen_folder
>
end tell
>
activate
>
end tell
--
Pier Kuipers
Visual ID
* the Media Asset Management solution *
2 Whitefriars
Aungier Street
Dublin 2
Tel. +353 1 476 7059
Mobile +353 87 294 3063
Fax +353 1 478 1366
ISDN +353 1 602 0754
http://www.visualid.com