Re: Do shell script and spaces in path
Re: Do shell script and spaces in path
- Subject: Re: Do shell script and spaces in path
- From: garbanzito <email@hidden>
- Date: Fri, 19 Apr 2002 09:12:17 -0600
at 2002 04 19, 11:30 +0100, they whom i call Giuliano Gavazzi wrote:
Thus:
do shell script "ls -l /Desktop\\ Folder"
works.
Now, a single backslash should be allowed, and it should be ignored
when not followed by special characters, that is:
"\ " should be equivalent to " ", this seems like a bug, but this is
not what you would need in your case anyway.
it's not a bug, it's a common conceptual fallacy. there is
no need to escape the *space* in AppleScript, because
AppleScript has no problem with spaces in strings. you need
to escape the *backslash* so that it reaches the shell,
where it is needed to escape the space.
in AppleScript ...
"\ " = an escaped space, compiles to " " before it reaches
the shell.
"\\ " = an escaped backslash followed by a space. "\ "
reaches the shell.
--
steve harley email@hidden
_______________________________________________
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.