AbbrevPath
The AbbrevPath function returns a string that is an abbreviated form of a file path. The returned string is no longer than a specified number of characters. The original name is unchanged.
sNewPath = AbbrevPath( sPath, nMaxChars ) |
sPath is the path name to abbreviate.
nMaxChars is the maximum number of characters in the abbreviated name.
sNewPath is the returned abbreviated path.
Suppose a file has the path name 'C:\My Folder\My File.txt'. Then
s = C:\My Folder\My File.txt |
-- open the file as text, for read and write |
Printf( "'%s'", s ) |
-- prints 'C:\My Folder\My File.txt' |
Printf( "'%s'", AbbrevPath(s,20) ) |
-- prints 'C:\...\My File.txt' |