PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Checking the existence of a directory
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
Checks the existence of an external file.
Remark: In 64-bit Windows, the access to a system directory from a 32-bit executable can be performed in a directory that differs from the expected one. See Native 64-bit and native 32-bit for more details.
Example
Reports and Queries
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 (with quotes)
Name and full path of file. The 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"))
Versions 15 and later
Windows This parameter can be in Ansi or Unicode format.
New in version 15
Windows This parameter can be in Ansi or Unicode format.
Windows This parameter can be in Ansi or Unicode format.
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 : wd250std.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