PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Example of extracted path
  • Example of extracted path
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Returns the different elements of a path: disk, directories, name and extension of the file.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 16 and later
Universal Windows 10 App This function is now available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This function is now available for the Windows Phone applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVWEBDEV - Server codeReports and QueriesJavaPHPAjaxUser code (UMC)
sFilePath is string
sResFileName is string
sResPathName is string

sFilePath = "C:\MyDirectories\File.doc"

// Retrieve the name of the file
sResFileName = fExtractPath(sFilePath, fFileName)
// sResFileName corresponds to "File"

// Retrieve the disk and path of the file
sResPathName = fExtractPath(sFilePath, fDrive + fDirectory)
// sResPathName corresponds to "C:\MyDirectories\"
WINDEVWEBDEV - Server codeReports and QueriesJavaPHPAjaxUser code (UMC)
// Use of UNC paths
Trace(fExtractPath("\\lg-br\sharedfiles\downloads\Windev\setup.exe", fDrive))
// Returns \\lg-br\sharedfiles
Trace(fExtractPath("\\lg-br\sharedfiles\downloads\Windev\setup.exe", fDirectory))
// Returns \downloads\Windev\
Windows Mobile
sFilePath is string
sResFileName is string

sFilePath = "C:\MyDirectories\File.psw"

// Retrieve the name of the file
sResFileName = fExtractPath(sFilePath, fFileName)
// sResFileName corresponds to "File"
Syntax
<Result> = fExtractPath(<File Path> , <Path Section to Extract>)
<Result>: Character string
  • Requested path section,
  • Empty string ("") if an error occurred. To find out the error details, use ErrorInfo associated with the errMessage constant.
<File Path>: Character string (with quotes)
Name and full (or relative) path of file (up to 260 characters). A UNC path can be used. The existence of <File Path> is not checked by fExtractPath. If the path does not end with a "\" character, the last element is considered as being a file.
Versions 15 and later
WindowsLinux This parameter can be in Ansi or Unicode format.
AndroidAndroid Widget This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: In Android, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its sub-directories, as well as onto the external memory (SDCard).
New in version 15
WindowsLinux This parameter can be in Ansi or Unicode format.
AndroidAndroid Widget This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: In Android, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its sub-directories, as well as onto the external memory (SDCard).
WindowsLinux This parameter can be in Ansi or Unicode format.
AndroidAndroid Widget This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: In Android, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its sub-directories, as well as onto the external memory (SDCard).
Windows Mobile This path must be a full path or a UNC path. It cannot be a relative path.
Versions 16 and later
Universal Windows 10 App Windows Phone: The file path corresponds to a relative path in relation to the current directory. The current directory corresponds to the data directory of application.
Reminder: Only the files found in the data directory associated with the application can be handled.
New in version 16
Universal Windows 10 App Windows Phone: The file path corresponds to a relative path in relation to the current directory. The current directory corresponds to the data directory of application.
Reminder: Only the files found in the data directory associated with the application can be handled.
Universal Windows 10 App Windows Phone: The file path corresponds to a relative path in relation to the current directory. The current directory corresponds to the data directory of application.
Reminder: Only the files found in the data directory associated with the application can be handled.
Versions 17 and later
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: On iPhone/iPad, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its sub-directories.
New in version 17
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: On iPhone/iPad, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its sub-directories.
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: On iPhone/iPad, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its sub-directories.
<Path Section to Extract>: Constant or combination of constants
Section of file path to extract:
fDriveName of the unit.
LinuxAndroidAndroid Widget iPhone/iPadWindows Mobile This constant is not available.
fExtensionExtension of the file, preceded by "."
fFileNameName of the file (without extension).
fDirectoryDifferent directories of the file (the file name and extension are not returned).
Remarks
WINDEVWEBDEV - Server codeReports and QueriesUniversal Windows 10 AppJavaPHPAjaxUser code (UMC)

Example of extracted path

If the specified path is "C:\Temp\Data\File.txt", fExtractPath returns:
  • fExtension: .txt
  • fFileName: File
  • fDirectory: \Temp\Data\
  • fDrive: C:
  • fFileName+fExtension: File.txt
  • fDirectory+fFileName: \Temp\Data\File
  • etc.
AndroidAndroid Widget Windows Mobile

Example of extracted path

If the specified path is "\Temp\Data\File.txt", fExtractPath returns:
  • fExtension: .txt
  • fFileName: File
  • fDirectory: \Temp\Data\
  • fFileName+fExtension: File.txt
  • fDirectory+fFileName: \Temp\Data\File
  • etc.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230std.dll
Windows Mobile wp230std.dll
Java wd230java.jar
Linux wd230std.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
EXEMPLO
https://youtu.be/KbKWNaL79Jw

http://windevdesenvolvimento.blogspot.com.br/2018/05/dicas-1744-publica-windev-arqivos-28.html

https://groups.google.com/d/forum/amarildowindev

// EXEMPLO

EDT_ARQUIVO=EDT_DIRETORIO+TABLE_LISTA_ARQUIVOS.COL_Nome

EDT_RESPOSTA="DIRETORIO:"+fExtractPath(EDT_ARQUIVO,fDirectory)+CR
EDT_RESPOSTA+="DRIVE:"+fExtractPath(EDT_ARQUIVO,fDrive)+CR
EDT_RESPOSTA+="NOME ARQUIVO:"+fExtractPath(EDT_ARQUIVO,fFileName)+CR
EDT_RESPOSTA+="EXTENSÃO:"+fExtractPath(EDT_ARQUIVO,fExtension)+CR

EDT_RESPOSTA+="NOME e extensão:"+fExtractPath(EDT_ARQUIVO,fFileName+fExtension)+CR
De matos
May 29 2018
AULA 1189 WinDev Arquivos 020 Separar Nome Arquivo
_descricao is string
_descricao = fExtractPath(EDT_arquivo_txt,fDirectory)
Info("DIRETORIO:"+_descricao)
_descricao = fExtractPath(EDT_arquivo_txt,fDrive)
Info("DRIVE"+_descricao)
_descricao = fExtractPath(EDT_arquivo_txt,fExtension)
Info("EXTENSÃO"+_descricao)
_descricao = fExtractPath(EDT_arquivo_txt,fFileName)
Info("NOME ARQUIVO"+_descricao)
_descricao = fExtractPath(EDT_arquivo_txt,fFileName+fExtension)
Info("NOME ARQUIVO E EXTENSÃO"+_descricao)

//BLOG COM VIDEO E EXEMPLO

http://windevdesenvolvimento.blogspot.com.br/2017/06/aula-1189-windev-arquivos-020-separar.html

https://www.youtube.com/watch?v=Qb2x1GZg_54

De matos
Jun. 27 2017
Exemplo Extrair Dados Arquivo
SAI_Arquivo=SAI_DIRETORIO+TABLE_lista_arquivos.COL_Nome_arquivo
sNomearquivo is string
sNomearquivo = fExtractPath(SAI_Arquivo,fDirectory)
SAI_resposta="fddire:"+sNomearquivo+CR
sNomearquivo = fExtractPath(SAI_Arquivo,fDrive)
SAI_resposta+="Drive:"+sNomearquivo+CR
sNomearquivo = fExtractPath(SAI_Arquivo,fExtension)
SAI_resposta+="extensao:"+sNomearquivo+CR
sNomearquivo = fExtractPath(SAI_Arquivo,fFileName)
SAI_resposta+="filenam:"+sNomearquivo+CR

//Blog com video e exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/03/curso-windev-arquivos-004-arquivos.html
De matos AMARILDO
Mar. 16 2016