C1ARK

Q: 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

Error_Message.png

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

Posted on Feb 2, 2016 5:33 PM

Close

Q: AppleScript, terminal, and files with spaces

  • All replies
  • Helpful answers