• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Universal or general path to desktop?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Universal or general path to desktop? (From: MR <email@hidden>)

  • Prev by Date: Re: do shell script - any limit to text argument?
  • Next by Date: Re: Applescript as Open With application
  • Previous by thread: Re: Universal or general path to desktop?
  • Next by thread: Re: Universal or general path to desktop?
  • Index(es):
    • Date
    • Thread