Hitachi

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


8.9.10 CheckDirName (check whether a folder name ends with a backslash)

Purpose

Checks whether a folder name ends with a backslash (\).

Syntax
CheckDirName (DirNameBuff [, Option])
Arguments
DirNameBuff

Specify the variable that stores the name of the folder to be checked.

Option

Specify the following optional value:

Value

Meaning

Remove

Remove the final backslash (\).

Description

If you omit the Option argument, the CheckDirName command checks the final character of the folder path stored in the specified variable, and appends a backslash (\) if the final character is not a backslash. If you specify Remove in Option, the CheckDirName command removes the final backslash.

The command returns True on successful execution, or False if an error occurs.

Example
' Make sure the folder path ends with \, then create
' a full path.
Dim  inDir , outDir
inDir = _TEMP_
outDir = "C:\Script\Data"
CheckDirName (inDir)
CheckDirName (outDir)
Copy (inDir+"FILE.DAT", outDir+"FILE.DAT", Overwrite)
JP1/Script version

Supported from JP1/Script 01-00.