Re: File Path Delimeters for Shell Scripts
Re: File Path Delimeters for Shell Scripts
- Subject: Re: File Path Delimeters for Shell Scripts
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 27 Nov 2003 12:50:36 -0800
On 11/27/03 12:28 PM, "Rick Gordon" <email@hidden> wrote:
>
How should I most easily go about changing the colon delimiters in a file path
>
to slash delimiters for use in a "do shell script" command?
By using the 'POSIX path' property. For 'do shell script' you're normally
going to want 'quoted form' of file paths as well, to do spaces correctly.
It inserts single quotes so you don't need to do wither AppleScript
quote-escapes nor Unix space-escapes. It will work on both aliases and text
(Unicode preferably) file paths.
set posixPath to quoted form of POSIX path of alias "disk:folder:file"
do shell script ("whatever " & posixPath)
--
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.