8.5.29 GetPath (get the path to the executable folder)
- Purpose
-
Gets the path to the executable folder.
- Syntax
GetPath
This command has no arguments.
- Description
-
The GetPath command gets the current path to the executable folder and returns the path as the execution result. The command does not append a backslash (\) to the folder name unless the root folder is the executable folder. If you want to have a backslash at the end of the folder name, specify 1 in the following registry:
- Registry key
HKEY_LOCAL_MACHINE\Software\Hitachi\JP1/Script\SPTX
- Value name
GetPath_Opt
- Value datatype
-
REG_DWORD
- Value
-
0: Do not add a backslash (\) to the folder name (initial value).
1: Add a backslash (\) to the folder name.
- When the setting takes effect
-
The setting takes effect the next time the script file is executed.
- Example
' If "Script.ini" exists, ' copy it to the "BKUP" folder in the current folder. outDir = GetPath + "\BKUP\" If IsExistFile( "Script.ini" ) Then Copy ( "Script.ini" , outDir ) End
- JP1/Script version
-
Supported from JP1/Script 01-00.