ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / External file functions
  • Checking the existence of a directory
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Checks the existence of an external file.
Remark: In 64-bit Windows, you can access a system directory from a 32-bit executable in a different directory. For more details, see Native 64-bit and native 32-bit.
Example
WINDEVWEBDEV - Server codeReports and QueriesJavaUser code (UMC)PHPAjax
AFile is string
AFile = "C:\Temp\Example.txt"
IF fFileExist(AFile) = True THEN
Info("The file named " + AFile + " exists on the disk")
END
Syntax
<Result> = fFileExist(<File name>)
<Result>: Boolean
  • True if the file exists,
  • False otherwise (the file name corresponds to a directory name for example).
<File name>: Character string
Name and full path of file. Wildcard characters (*,?) are not allowed. You can call fDir to use wildcard characters. If only the file name is specified (without the path), the file is sought in the current directory (for example: fFileExist("Test.jpg"))
WindowsLinux This parameter can be in Ansi or Unicode format.
AndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst This parameter can correspond to a full path or a path relative to the current directory (returned by fCurrentDir). This parameter is case-sensitive.
Remarks

Checking the existence of a directory

To check the existence of a directory, use fDirectoryExist.
Related Examples:
Handling text files Unit examples (WINDEV): Handling text files
[ + ] Handling "text" files with WINDEV:
- Create a text file
- Write into a text file
- Read in a text file
Handling text files Unit examples (WEBDEV): Handling text files
[ + ] This example explains how to handle "non HFSQL" files with WEBDEV and it allows you to:
- Create a text file
- Write into a text file
- Read in a text file
Handling text files Unit examples (WINDEV Mobile): Handling text files
[ + ] Handling external "text" files:
- Create a text file
- Write into a text file
- Read in a text file
Component: wd290std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Exemplo Se Arquivo Existe
Exemplo Se Arquivo Existe

s_arquivo is string="e:\aleva\teste.xml"
IF fFileExist(s_arquivo) THEN
Info("Arquivo Existe")
ELSE
Info("Arquivo Nao Existe")
END

//Blog com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/08/curso-windev-arquivos-007-arquivos-ver.html
https://www.youtube.com/watch?v=MhChfygEG9M
De matos AMARILDO
18 Aug. 2016

Last update: 06/22/2023

Send a report | Local help