Monday, January 22, 2007

Applescript

Q. Ok soo.. I wanted to change directories using the Do Shell Script command in Applescript. The problem was that the directory had a space in it "Thumbdrive 2". (On a side note, why is there a "Thumbdrive", and a "Thumbdrive 1" in my /volumes folder when I only have one actual Thumbdrive plugged in?)
Anyway.. Here's how to do it

A.
  1. do shell script "cd " & quoted form of "/Volumes/THUMBDRIVE 2" & ";ls"
  2. do shell script "cd \"/Volumes/THUMBDRIVE 2\" ;ls"
The ls was just to use the ; command

No comments: