ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / External file functions
  • Extracting the different elements from a file path
fExtractPath (Example)
Extracting the different elements from a file path
WEBDEV - Server codeWindowsLinuxPHPAjax 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

Last update: 08/22/2022

Send a report | Local help