Re: Universal or general path to desktop?
Re: Universal or general path to desktop?
- Subject: Re: Universal or general path to desktop?
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 08 Apr 2003 07:28:42 -0700
On 4/7/03 11:22 PM, "MR" <email@hidden> wrote:
>
I don't see how that will help. A ((path to desktop folder as
>
string)) will be different for every desktop. e.g. the example I gave
>
specific to my desktop is
>
>
"Macintosh HD: users:Mike:desktop:PDFfiles:"
>
>
whereas the path to another desktop might be
>
>
"Payables HD:users:Linda:desktop:PDFfiles:"
Well, that's _precisely_ why it will work. Isn't that what you wanted? " I
need it to work on any desktop that has a folder with that name." Any user
that has folder named "PDFFiles" on the desktop will have:
set folderPath to ((path to desktop as string) & "PDFFiles:")
try
get alias folderPath
on error
display dialog "Squawk"
error number -128 -- quit
end try
-- do other stuff
Naturally you must include the first line just as it is so it will resolve
to the desktop and folder of whoever is running the script. If you're going
to be using the Finder immediately anyway, you might prefer this version:
set folderPath to ((path to desktop as string) & "PDFFiles:")
tell application "Finder"
if exists folder folderPath then
--do other stuff
else
activate
display dialog "Squawk"
error number -128 -- quit
end if
end tell
>
I need to be able to point the script to a folder that is already on
>
each desktop (PDFfiles) so that following scripts can put PDF files
>
into that file. I've got it working on my computer. Now I need it to
>
work on any desktop that has a folder with that name.
--
Paul Berkowitz
_______________________________________________
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.