AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de archivos externos
  • Extracting the different elements from a file path
fExtractPath (Example)
Extracting the different elements from a file path
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindowsLinuxJavaCódigo de Usuario (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)
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 22/08/2022

Señalar un error o enviar una sugerencia | Ayuda local