I have an Applescript that opens the Terminal, changes to a directory, then dumps the filenames in that directory to a text file.
Here is what the example script looks like. This works no problem.
tell application "Terminal"
activate
delay 1
do script "cd /Users/john/Desktop"
delay 1
do script "ls > test.txt" in window 1
delay 1
quit "Terminal"
end tell
----
This script does not work and I assume it is because my business dropbox folder has a space in it in addition parentheses. This is the line that is giving me problems.
do script "cd /Users/john/Dropbox\ \(MacRumors\)/Racecar"
I cannot rename the Dropbox folder because Dropbox evidently has to use this naming convention. Regardless, how can I make this work as is?
tell application "Terminal"
activate
delay 1
do script "cd /Users/john/Dropbox\ \(MacRumors\)/Racecar"
delay 1
do script "ls > test.txt" in window 1
delay 1
quit "Terminal"
end tell
---
Thanks for any help!
Here is what the example script looks like. This works no problem.
tell application "Terminal"
activate
delay 1
do script "cd /Users/john/Desktop"
delay 1
do script "ls > test.txt" in window 1
delay 1
quit "Terminal"
end tell
----
This script does not work and I assume it is because my business dropbox folder has a space in it in addition parentheses. This is the line that is giving me problems.
do script "cd /Users/john/Dropbox\ \(MacRumors\)/Racecar"
I cannot rename the Dropbox folder because Dropbox evidently has to use this naming convention. Regardless, how can I make this work as is?
tell application "Terminal"
activate
delay 1
do script "cd /Users/john/Dropbox\ \(MacRumors\)/Racecar"
delay 1
do script "ls > test.txt" in window 1
delay 1
quit "Terminal"
end tell
---
Thanks for any help!