SplitPathΒΆ

SplitPath breaks a full path into its four components: drive name, diretory name, file name and extension.

smSplitPath = SplitPath(svFileName)

Return Value

smSplitPath is a string vector with four elements if svFileName contains one file and a matrix with four columns if svFileName contains more than one filename:

Value Meaning
svSplitPath[1] is the drive letter followed by a colon.
svSplitPath[2] is the path of subdirectories, including the trailing slash.
svSplitPath[3] is the file name.
svSplitPath[4] is the extension including the leading period (.).

Parameters

svFileName

svFileName is a complete file name.

Example

* SplitPath("d:/test/test.xls")'
d:
/test/
test
.xls

id-155270