Re: POSIX paths query explained better
Re: POSIX paths query explained better
- Subject: Re: POSIX paths query explained better
- From: Christopher Nebel <email@hidden>
- Date: Wed, 8 Oct 2003 10:01:49 -0700
On Oct 8, 2003, at 9:30 AM, Peter Beentje wrote:
exists file "'/Volumes/Server/Master Database/to be Databased/AUGUST
IMAGE UPLOADS - No17/layouts/161999-Image.eps'"
--> false
Doesn't POSIX need escaped spaces? "\ " instead of " "?
First, quoting has to do with the shell, not POSIX. A POSIX path can
contain whatever characters it likes with no escaping. (Except for
slash, since that's defined as the path separator.)
In order to get the shell to interpret it as one argument, though, you
might need to quote it, and there's more than one way to do that. One
way is to use backslashes before otherwise troublesome characters like
spaces, as you suggest. Another way is to surround the whole thing
with single quotes (and escape embedded single quotes properly.) The
"quoted form" property of strings will do this for you, and that's
what's going on above -- notice the single quotes inside the double
quotes.
--Chris Nebel
AppleScript Engineering
_______________________________________________
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.