• 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: POSIX paths query explained better
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: POSIX paths query explained better (From: Peter Beentje <email@hidden>)

  • Prev by Date: Re: POSIX paths query explained better
  • Next by Date: Re: Dock Apps - User apps running
  • Previous by thread: Re: POSIX paths query explained better
  • Next by thread: Re: POSIX paths query explained better
  • Index(es):
    • Date
    • Thread