Cicode Programming Reference > Cicode Function Categories > File Functions > FileSplitPath

FileSplitPath

Splits a file path into individual string components. You enter the full path string as sPath. The individual components of the path name are returned in the arguments sDrive, sDir, sFile, and sExt. Arguments must be declared as Cicode variables. If declared as local variables or tags, an "Incompatible Types" error will be returned.

Syntax

FileSplitPath(sPath, sDrive, sDir, sFile, sExt)

sPath:

The full path string.

sDrive:

The disk drive. Must be a String type variable.

sDir:

The directory string. Must be a String type variable.

sFile:

The file name (without the extension). Must be a String type variable.

sExt:

The file extension. Must be a String type variable.

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

FileSeek, FileFind, FileMakePath

Example

See FileFind

See Also

File Functions

Published June 2018