There are several methods to check for a file or folder’s existence. However, the fastest and most reliable is attempting to aliasize its path. Let’s go to the sample (with a file, but it’s the same for a folder or disk):
set unknownFile to "path:to:this stuff.html" try alias unknownFile --> file exists, go ahead on error --> file doesn't exist --> do whatever end try
The trick is that an alias is a file or folder which exists. So, if file “this stuff.html” does not exist in folder “to” in disk “path”, you will receive an error.