PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • Extracting the different elements from a file path
fExtractPath (Example)
Extracting the different elements from a file path
WINDEVWEBDEV - Server codeReports and QueriesWindowsLinuxJavaUser code (UMC)PHPAjax The following code is used to display the different elements of a file path.
// Declare the variables
ResExtension is string
ResFile is string
ResDirectory is string
ResDrive is string
FilePath is string
 
// Select a file
FilePath = "C:\MyDirectories\File.txt"
 
// Retrieve the different elements of the path
ResExtension= fExtractPath(FilePath, fExtension)
ResFile = fExtractPath(FilePath, fFileName)
ResDirectory = fExtractPath(FilePath, fDirectory)
ResDrive = fExtractPath(FilePath, fDrive)
 
// Display the different elements of the path
Info("The extension of the file is: " + ResExtension + CR + ...
"The name of the file is: " + ResFile + CR + ...
"The directories are: " + ResDirectory + CR + ...
"The disk is: " + ResDisk)
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment