Hitachi

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


8.5.27 MakePath (create a full path)

Purpose

Creates a full path.

Syntax
MakePath (FullPathBuff, DrvName, DirName, LblName, ExtName)
Arguments
FullPathBuff

Specify a variable for storing the created full path.

DrvName

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

DirName

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

LblName

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

ExtName

Specify the file extension as a character string or as a variable that stores this value.

Description

The MakePath command creates a full path by joining the drive name, folder name, file name, and file extension, and stores the full path in the buffer variable. The command returns True on successful execution, or False if an error occurs.

The command automatically appends a colon (:) to the drive name, encloses the folder name with backslashes (\), and prefixes a period (.) to the extension even if you omit any of these symbols.

Example
' Analyze the file name stored in OriginalFile, and
' create a full path with new extension ".BAK" in BackupFile.
Dim  OriginalFile ,BackupFile ,Drv ,Dir ,Lbl ,Ext
OriginalFile = _SCF_ + "TEST.SPT"
SplitPath ( OriginalFile ,Drv ,Dir ,Lbl ,Ext )
MakePath ( BackupFile ,Drv ,Dir ,Lbl ,".BAK" )
JP1/Script version

Supported from JP1/Script 01-00.