Hitachi

JP1 Version 11 JP1/Script Description and Reference (For Windows Systems)


8.9.5 IsExistDir (check whether a folder exists)

Purpose

Checks whether a folder exists and returns True or False.

Syntax
IsExistDir (DirName)
Argument
DirName

Specify the folder name as a string or as a variable that stores this value.

Description

The IsExistDir command checks whether a folder exists. The command returns True if the folder exists, or False if not. Note, however, that if you do not have access permissions to read the parent folder of the specified folder, the command returns False even if the folder exists.

Note

Take care when specifying the folder, or a folder in the folder set in the following environment variables: ProgramFiles (normally the Program Files folder on the system drive) and WinDir (normally the Windows folder on the system drive). For details, see 1.8.2 Command behavior.

Example
' Create a "SCRIPT" folder in the executable folder if one
' does not already exist.
path1 = _BIN_+"SCRIPT"
If IsExistDir (path1) = False Then
  MakeDir (path1)
End
JP1/Script version

Supported from JP1/Script 01-00.