1

I use the following code to open my dropbox folder quickly using textexpander.

tell application "Finder"
    activate
    set f to POSIX file "/Users/MrT/Dropbox"
    open f
end tell

Which works, but then I want to go deeper in my folders using this code. It does not work. It looks like Textexapnder does not recognize spaces in file paths.

tell application "Finder"
    activate
    set f to POSIX file "/Users/MrT/Dropbox/School/Hardvard/6-Fall Session 2013"
    open f
end tell
5
  • Works here, are you sure the path is correct (e.g. Hardvard instead of Harvard)? Instead of TextExpander, you can also use AppleScript Editor to test the snippet directly. – nohillside Oct 21 '13 at 16:40
  • @patrix Yes I am sure, I copy pasted the path from the GetInfo. Still not working – Conrad C Oct 21 '13 at 18:53
  • It works on Applescript, but not in TextExpander – Conrad C Oct 21 '13 at 18:58
  • Just for testing purposes: Can you rename your Dropbox path on your drive to not include any spaces (and adjust the TE code accordingly) and try again? – nohillside Oct 21 '13 at 19:11
  • I tested without space and without space+no "-" character Still not working – Conrad C Oct 21 '13 at 19:14
1

I might be totally off track, but give this a try:

tell application "Finder"
    activate
    set f to "Users/MrT/Dropbox/School/Hardvard/6-Fall Session 2013"
    set a to POSIX file f
    open a
end tell

If that fails to work, change it to the following:

tell application "Finder"
    activate
    set f to "Macintosh HD:Users:MrT:Dropbox:School:Hardvard:6-Fall Session 2013"
    set a to POSIX file f
    open a
end tell

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .