• 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: slash path to alias
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: slash path to alias


  • Subject: Re: slash path to alias
  • From: Luther Fuller <email@hidden>
  • Date: Fri, 25 Jul 2008 17:41:46 -0500

Thanks. Exactly what I needed. I have been working on a script since about 7am, today. Trying to get it to work in both Leopard and Tiger. All these hours later, I finally found that mailbox paths returned by Tiger's Mail have no colon at the end while those returned by Leopard do. So ...

	POSIX path of acntDir
	if (last character of acntDir) = ":" then
		set acntDir to (POSIX file the result) as text
	else
		set acntDir to ((POSIX file the result) as text) & ":"
	end if

And now it works in both Tiger and Leopard. All day poking around in code and the problem was only a colon. Hate it when that happens!

On Jul 25, 2008, at 3:57 PM, Mark J. Reed wrote:

Yes.  POSIX file.

set f to POSIX file
"/Users/username/Library/Mail/POP-username(a)mail.alltel.net"

--> file "Macintosh
HD:Users:username:Library:Mail:POP-username(a)mail.alltel.net"

On Fri, Jul 25, 2008 at 4:49 PM, Luther Fuller <email@hidden > wrote:
I have a path to a folder that looks like this ...

      "/Users/username/Library/Mail/POP-username(a)mail.alltel.net"

I can easily convert it to an alias in a few lines of code using text item
delimiters ("/" --> ":") and adding the disk name as a prefix.


Can this be done with one command? Something like the reverse of posix path?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: slash path to alias
      • From: Axel Luttgens <email@hidden>
    • Re: slash path to alias
      • From: Skeeve <email@hidden>
References: 
 >slash path to alias (From: Luther Fuller <email@hidden>)
 >Re: slash path to alias (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: replacing embedded images in Illustrator
  • Next by Date: Re: Computer Serial Number
  • Previous by thread: Re: slash path to alias
  • Next by thread: Re: slash path to alias
  • Index(es):
    • Date
    • Thread