Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

AppleScript, terminal, and files with spaces

Hey all, I was writing a little program to move files around with the do script action. I ran into an issue with files that have spaces. Applescript freaks out a bit when I use the terminal command "touch ~/Desktop/Hello\ World". Is there a work around for this?

tell application "Terminal"
  do script "touch ~/Desktop/Hello\ World"

end tell

User uploaded file

MacBook Pro with Retina display, OS X El Capitan (10.11.3), Dvorak Keyboard Layout

Posted on Feb 2, 2016 5:30 PM

Reply
Question marked as Best reply

Posted on Feb 2, 2016 7:11 PM

Put a second \ next to the existing one.


(139109)

3 replies

AppleScript, terminal, and files with spaces

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.