I've got some Applescript code that switches to a specified directory by KEYSTROKEing the path into the "Go To" dialog.
Regretfully, this dialog does NOT raise an error if the requested directory does not exist?! It just goes as far as it can along the path and then DUMPS THE NONEXISTENT PATH FRAGMENT into the default text field of whatever window is under it!
Example: given "~/Music/nonexistent" it would switch to the Music folder in the user's home folder then 'type' "nonexistent" into the underlaying window's default text field if it has one.
Consequently, I need to know how to find out if a given path already exists or not from Applescript.