• 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: Handling file paths on external volumes?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handling file paths on external volumes?


  • Subject: Re: Handling file paths on external volumes?
  • From: Paul Berkowitz <email@hidden>
  • Date: Sun, 10 Aug 2003 19:29:14 -0700

On 8/10/03 7:17 PM, "T.J. Mahaffey" <email@hidden> wrote:

> I'm working with some file paths which begin with the OS-recognized "/Volumes"
> string.
> Aside from the POSIX path implications, does anything have any experience or
> recommendations for working with these sorts of paths?
>
> More specifically, I"m scripting the attachment of files to emails (various
> clients), but I can't seem to come up with a reliable way to pass a "/Volumes"
> path to any of these apps.
>
> So, is there some kind of magic for translating a path like that into
> something an email client understands? Most want an alias or ":"-delimited
> path, of course, and that hasn't been a problem as long as said file resides
> on the startup disk. But what about other volumes?
>
> Again, I know how to alter path-delimitations. I'm looking for information
> regarding the "/Volumes" situation.
>
> Thanks in advance for any information or insight anyone might lend.

Are you taking a very long way around? The conversion is:

POSIX file unixPath

which works just as well for "/Volumes/" path as for startup disk "/" paths.
You must have spaces properly \escaped or else put the whole thing in single
quotes within the double quotes ('quoted form').

set g to POSIX file "/Volumes/Apps HD/Applications/BBEdit Lite
6.1/BBEdit Lite 6.1 for OS X"

compiles as:

set g to file "Apps HD:Applications:BBEdit Lite 6.1:BBEdit Lite 6.1 for
OS X"

and runs as:

--> file "Apps HD:Applications:BBEdit Lite 6.1:BBEdit Lite 6.1 for OS X"

--
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.

  • Prev by Date: Re: Handling file paths on external volumes?
  • Next by Date: Re: Mail message
  • Previous by thread: Re: Handling file paths on external volumes?
  • Next by thread: Re: Handling file paths on external volumes?
  • Index(es):
    • Date
    • Thread