Help / WLanguage / WLanguage functions / Standard functions / External file functions
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Returns the full short path of a file or directory.
// Retrieve the short path of a file
ResShortPath = fShortPath("C:\MyDirectories\Report March 2000.doc")
// fShortPath returns: "C:\MyDir~1\Account~1.doc"
<Result> = fShortPath(<File path> [, <Option>])
<Result>: Character string
  • Short name corresponding to the full path of the file or directory (empty string if an error occurred). If <File path> ends with a \ character, this character is retained.
  • Empty string ("") if an error occurred. To get more details on the error, use ErrorInfo with the errMessage constant. An error is generated for example if the specified file or directory does not exist.
<File path>: Character string
Name and full (or relative) path of the file or directory (up to 260 characters). A UNC path can be used. This parameter can be in Ansi or Unicode format.
<Option>: Optional integer constant
Used to specify the format of function result. By default, fShortPath returns a character string in Ansi format.
fPathUNICODE<Result> will be a Unicode string.

Remark: The result of fShortPath is always an ANSI character string, the fPathUNICODE constant is only used to store the result in a Unicode character string.
Component: wd300std.dll
Minimum version required
  • Version 9
This page is also available for…
Click [Add] to post a comment

Last update: 08/22/2022

Send a report | Local help