Icon DirectoryExists

Unit: Internal

Available In: Server Applications

function DirectoryExists(const Directory: String): Boolean

The DirectoryExists function returns True if the directory specified in the input parameter exists, or False if the directory does not exist.

Information The specified directory path should be an absolute path. Relative paths are permitted, but they rely on the current working directory. The current working directory is a per-process setting and is not reliable in a multi-threaded setting like the web server.

Examples

if DirectoryExists('C:\temp\backup') then
   RemoveDirectory('C:\temp\backup');
Image