PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Finding out the short path of a file
fShortPath (Example)
Finding out the short path of a file
The following code is used to find out the short path of a file. The file name and path are selected by fSelect.
// Declare the variables
FilePath is string
ResShortPath is string

// Select a file
FilePath = fSelect("C:\MyDirectories", "", "Selecting a file", ...
"All files (*.*)" + TAB + "*.*", "", fselOpen + fselExist)

// Retrieve the short path
ResShortPath = fShortPath(FilePath)

// Display an error message if the retrieval was not performed
IF ResShortPath = "" THEN
Error(ErrorInfo(errMessage))
ELSE
  // Display the short path
  Info("The short path is: " + ResShortPath)
END
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment