Hitachi

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


8.5.26 SplitPath (analyze a full path)

Purpose

Analyzes a full path.

Syntax
SplitPath (FullPath, [DrvNameBuff], [DirNameBuff ], [LblNameBuff] [, ExtNameBuff])
Arguments
FullPath

Write the full path of the file as a character string or as a variable that stores this value.

DrvNameBuff

Specify a variable for storing the drive name. Omit this argument if not required.

DirNameBuff

Specify a variable for storing the folder name. Omit this argument if not required.

LblNameBuff

Specify a variable for storing the file name. Omit this argument if not required.

ExtNameBuff

Specify a variable for storing the file extension. Omit this argument if not required.

Description

The SplitPath command analyzes the specified full path into the drive name, folder name, file name, and file extension, and stores each part in the buffer variables. The command returns True on successful execution, or False if an error occurs.

A colon (:) is appended to the drive name. The folder name is enclosed with backslashes (\). The extension is preceded by a period (.).

Example
Dim drv1, dir1, lbl1, ext1
SplitPath ("C:\WINDOWS\WINFILE.EXE", drv1, dir1, lbl1, ext1)
  _
  drv1 C:
  dir1 \WINDOWS\
  lbl1 WINFILE
  ext1 .EXE
JP1/Script version

Supported from JP1/Script 01-00.