Page 1 of 1

Script command to suppress error message?

Posted: 23 Jul 2011 12:48
by ghost zero
Is there a script command to suppress the error message if a script fails? For example, I have this script for a toolbar button...

goto "Z:\"

...but it gives an error when there is no Z: drive. I don't want to see the error message popup. I just want it to auto cancel or auto continue. Is there a way?

Re: Script command to suppress error message?

Posted: 23 Jul 2011 13:22
by Stefan

Code: Select all

exists()

Checks whether a file or directory exists. 

Syntax 
exists(item) 

item: Full path (local or UNC) to a file system item. 

return: 0 = does not exist
          1 = exists (file)
          2 = exists (folder; drive; share; server) 
Perhaps something like this could work for you:
if (exists("Z:\") == 2){ goto "Z:\"; }