PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Extracting the different elements from a file path
  • Extracting the different elements from a file path (WINDEV Mobile)
fExtractPath (Example)
Extracting the different elements from a file path
WINDEVWEBDEV - Server codeReports and QueriesWindowsLinuxJavaPHPAjaxUser code (UMC) 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)
Extracting the different elements from a file path (WINDEV Mobile)
Windows Mobile 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
FilePath is string = "\My Files\File.TXT"

// Retrieve the different elements of the path
ResExtension= fExtractPath(FilePath, fExtension)
ResFile = fExtractPath(FilePath, fFileName)
ResDirectory = fExtractPath(FilePath, fDirectory)

// 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)
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment