Hitachi

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


8.5.10 MakeDir (create a folder)

Purpose

Creates a folder.

Syntax
MakeDir (DirPath)
Argument
DirPath

Write the new folder path as a character string or as a variable that stores this value.

Description

The MakeDir command creates the specified folder. The command returns True on successful execution, or False if an error occurs.

If the path to the specified folder does not exist, the required path and folder are created.

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

  • You can configure access permissions for a folder you created. If the path to the specified folder does not exist, access permissions are also applied to creation of the path to the folder. In the following registry key, set the access permissions beforehand.

Registry key

HKEY_LOCAL_MACHINE\SOFTWARE\Hitachi\JP1/Script\SPTX\Option

Value name

SecurityAttributesSucceed

Value datatype

REG_DWORD

Value

0: Access permissions are not set.

1: Access permissions are set to "Inherit access permissions from parent folders".

2: Access permissions are set to "Everyone: Full control".

If no value is set, or a value other than those above is set, the setting defaults to 0.

When the setting takes effect

The setting takes effect the next time the script file is executed.

Example
' Create a folder "HITACHI" in the Windows folder.
MakeDir (_WIN_+"HITACHI")
JP1/Script version

Supported from JP1/Script 01-00.