folderexists(
PATH
)

The folderexists( function returns true if a folder exists, false if it does not.


Parameters

This function has one parameter:

path – is a path to the folder, including the folder name (see Files and Folders for more information about file paths).


Description

This function checks to see if a folder exists.

if folderexists("~/Documents/News") = false()
    message "No news available!"
endif

Note that a path to a package file, like a .pandb file, will return true, although package files appear to be files in the Finder, they are actually folders.

Legacy Syntax (Separate Folder and File Parameters)

In older versions of Panorama (6.0 and earlier) the folderexists( function had two parameters, folderid and filename. To maintain compatibility with older databases, two parameters will still work, as shown in this example:

folderexists(folder("~/Documentation"),"News")

For new databases you’ll probably find it easier to use the single parameter mode.


See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0, but now may have either one parameter (path) or two (folder, path).