AbbreviatePathNameΒΆ

The AbbreviatePathName function creates a abbreviate path name.

svShortNames = AbbreviatePathName(svFileNames, nMaxLen)
svShortNames = AbbreviatePathName(svFileNames, nMaxLen, bAtLeastName)

Return Value

svShortNames is a string vector with short path names.

Parameters

svFileNames

svFileNames is a vector of path names.

nMaxLen

nMaxLen is the maximum number of characters of the abbreviated path name.

bAtLeastName

If bAtLeastName is TRUE (1), at least the file name is returned. If bAtLeastName is FALSE (0) and the parameter nMaxLen is smaller than the length of the file name, an empty string is returned. Default value is TRUE (1).

Example

* AbbreviatePathName("c:/test/test1/test2/filename.dat", 30, TRUE)
* c:/test/.../test2/filename.dat
*
* AbbreviatePathName("c:\test\test1\test2\filename.dat", 30, TRUE)
* c:\test\...\test2\filename.dat
*
* AbbreviatePathName("\\P300\c\test\test1\test2\filename.dat", 30, TRUE)
* \\P300\c\...\filename.dat

See also

SplitPath

id-951841