Re: POSIX path with osascript
Re: POSIX path with osascript
- Subject: Re: POSIX path with osascript
- From: Christopher Nebel <email@hidden>
- Date: Fri, 29 Jan 2010 12:48:56 -0800
On Jan 27, 2010, at 1:48 PM, Luther Fuller wrote: On Jan 27, 2010, at 3:02 PM, Jay Louvion wrote: on run argv tell application "Finder" try set AliasList to {} set FolderPath to item 1 of argv repeat with FileName in (items 2 thru end of argv) set FileAlias to (POSIX path of FolderPath as text) & "/" & FileName as string as alias set AliasList to AliasList & FileAlias end repeat
It seems that 'argv' is a list whose 1st item is a folder path and whose remaining items are the names of files it contains. Is the 1st item a posix path or a colon delimited path or an alias? I will presume that it's an alias.
You presume incorrectly. Strictly speaking, items of argv aren't even POSIX paths, they're just text. (Which might happen to be valid POSIX paths, but they might not, which is why it doesn't try to automatically turn them into alias objects.)
--Chris Nebel AppleScript Engineering
PS: open(1) may be of some use to you here. I frequently use it from Terminal to open directories in Finder. |
_______________________________________________
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