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: Giuliano Gavazzi <email@hidden>
- Date: Fri, 19 Apr 2002 11:30:37 +0100
At 11:40 am +0200 2002/04/19, Ralf Bitter wrote:
Please forgive me, this may have been asked a hundred times,
but I didn't find an answer in the archives.
How do you write a space in a path of a " do shell script" statement?
For example: do shell script "ls -l /Applications/BBEdit\ Lite"
This gives an error. Seems, that a backslash is not allowed in a path,
although this is the way the path is written in a shell.
if you think about it that is the way it is escaped in the shell, but
here you are writing it as a string (in quotes). Backslash is an
escape character in quotes, so you have to escape it itself, as in \\.
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.
Giuliano
--
H U M P H
|| |||
software
Java & C++ Server/Client/Human Interface applications on MacOS - MacOS X
http://www.humph.com/
_______________________________________________
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.