Apostrophes in path to file

Dear all

Have been provided with an ace little shell script which works nicely when triggered using an applescript. However, when I move the shell script to a folder with a space and an apostrophe it returns an error. How do I get around this problem?

working script

do shell script "/Users/GarethPenman/Documents/shellscript"

non-working script

do shell script "'/Users/GarethPenman/Documents/Gareth's Documents/shellscript'"

returns the error:

error “sh: -c: line 0: unexpected EOF while looking for matching `‘’
sh: -c: line 1: syntax error: unexpected end of file” number 2

Do I need to add owt?

Cheers

G

Remember yesterday

http://macscripter.net/viewtopic.php?pid=163626#p163626

I tried the double then single quotes but that doesn’t seem to allow the srcipt to run. Was there something else you’d posted? Or have I missed the point?

Thanks

Gareth

do shell script quoted form of "/Users/GarethPenman/Documents/Gareth's Documents/shellscript"

quoted form of handles the proper quoting automatically

Ahaaaaa!!

Missed that little difference. Now works perfectly and have an automator app to toggle my displays.

Cheers

Gareth