file.exists

Syntax file.exists (path)

Params path is a legal path name to the file or folder whose existence you wish to confirm.

Action Determines if the file or folder indicated by path exists.

Returns True if the indicated file or folder is present, false if it doesn't exist.

Examples file.exists ("C:\\Program Files\\Frontier\\cactus.gif")

   » true

file.exists ("C:\\Program Files\\Frontier\\Copy of cactus.gif")

   » false

file.exists ("System:System Folder:System")

   » true

file.exists ("System:System Folder:System 8.0")

   » false

Notes It is a good practice to check to see if a file or folder exists before operating on it with any of the other file verbs.

Discuss