Re: Answer?? Move .ps files to Distiller Watched Folder?
Re: Answer?? Move .ps files to Distiller Watched Folder?
- Subject: Re: Answer?? Move .ps files to Distiller Watched Folder?
- From: Eric Schult <email@hidden>
- Date: Tue, 02 Oct 2001 14:28:13 -0500
on 10/2/01 2:13 PM, email@hidden at email@hidden
wrote:
>
WES said try...
>
>
tell application "Finder"
>
set postscriptList to (every file in folder (sourceFolder)) whose name
>
contains ".ps" -- line wrap
>
repeat with i in postscriptList
>
move i to folder (targetFolder)
>
end repeat
>
end tell
>
>
==========================================================================
>
Wes and Scripters,
>
I got my answer at the same time I received your response. Any caveats to
>
writing it as such:
>
--------------------
>
tell app "Finder"
>
move (every file of foldertoprocess whose name contains ".ps") to "Folder"
>
end tell
>
--------------------
>
I notice you use a repeat. Is this because the finder may "Balk" at folders
>
with too many files? Or is it just faster than the "Move Every File"?
I use a repeat loop in a similar script, because in it I check Distiller's
"Out" folder for the presence of a pre-existing .PDF (to avoid redundant
Distilling .ps files). If you're running this script once, and there's no
need to run it incrementally (using a stay-open script or folder actions
script, for example), then by all means, skip the repeat loop.
WES