Re: symlinks
Re: symlinks
- Subject: Re: symlinks
- From: Emmanuel LEVY <email@hidden>
- Date: Sat, 14 Aug 2010 00:25:56 +0200
I apologize, please pardon me.
set actualfolder to posix path of (f as alias) -- may be /Volumes/
Library-1/etc
this is wrong it's really: posix path of (posix file f as alias)
To get your pardon, here is an unvaluable contribution, our
"dereferencepath" handler.
on dereferencepath(f)
try
return POSIX path of (POSIX file f as alias)
end try
set {x, y} to find text "^(.*/)([^/]+/?)$" in f using {"\\1", "\\2"}
with regexp and string result
return dereferencepath(x) & y
end dereferencepath
Emmanuel
On Aug 13, 2010, at 11:36 PM, Luther Fuller wrote:
On Aug 12, 2010, at 5:16 PM, Emmanuel LEVY wrote:
set f to "/Users/emmanuel/Desktop/fred/"
set actualfolder to posix path of (f as alias) -- may be /Volumes/
Library-1/etc
set somepath to actualfolder & "some/path/to/some/item"
read posix file somepath
I'm having a problem with (f as alias) where f is clearly a posix
path.
(Emmanuel, did you get any error with (f as alias)?)
I have never had any trouble converting an alias to a posix path for
use in a 'do shell script ...'.
This afternoon, I have been trying to convert a valid posix path to
an alias.
This seems to be impossible.
_______________________________________________
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
References: | |
| >symlinks (From: Luther Fuller <email@hidden>) |
| >Re: symlinks (From: Emmanuel LEVY <email@hidden>) |
| >Re: symlinks (From: Luther Fuller <email@hidden>) |