PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • 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.
Component: wd280std.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