DIR_EXISTS()

DIR_EXISTS(D)

RETURNS 1 IF THE DIRECTORY D EXISTS, 0 OTHERWISE

  • Type: Function
  • Parameter: 1
  • Group: Directory

ACTION

The fonction DIR_EXISTS(D) returns 1 if the directory D exists and 0 otherwise. D is the absolute or relative name of the directory.

The absolute name is the entire name, related to the root of the file system (ex: "c:\temp\files\" or "c:\temp\files").

The relative name is the name of the directory related to the current directory (ex: "files" or "\files" or "files\" or "\files\").

SYNTAX: Result=DIR_EXISTS(D)

  • D = absolute or relative name of the directory.

USE

  • The function DIR_EXISTS() is used to know if a directory exists.

ERROR

  • If D is not a correct name of directory.

EXAMPLE

rem test if the directory "temp" exists

if dir_exists("temp")=1 then print "the directory exists"

SEE ALSO

DIR_CHANGE

DIR_MAKE

DIR_CURRENT$