PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Checking the existence of a directory
  • Equivalence
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.
Note: 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.
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.
Example
WINDEVWEBDEV - Server codeReports and QueriesJavaPHPAjaxUser code (UMC)
AFile is string
AFile = "C:\Temp\Example.txt"
IF fFileExist(AFile) = True THEN
Info("The file named " + AFile + " exists on the disk")
END
Windows Mobile
AFile is string
AFile = "\Temp\Example.txt"
IF fFileExist(AFile) = True THEN
Info("The file named " + AFile + " exists")
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. To use the wildcard characters, you have the ability to call fDir. 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
WindowsLinux This parameter can be in Ansi or Unicode format.
AndroidAndroid Widget 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.
New in version 15
WindowsLinux This parameter can be in Ansi or Unicode format.
AndroidAndroid Widget 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.
WindowsLinux This parameter can be in Ansi or Unicode format.
AndroidAndroid Widget 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.
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 In 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.
New in version 16
Universal Windows 10 App In 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.
Universal Windows 10 App In 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.
Remarks

Checking the existence of a directory

To check the existence of a directory, use fDirectoryExist.
Windows Mobile

Equivalence

The operating mode of fFileExist is equivalent to the operating mode of ceFileExist.
The only difference is:
  • ceFileExist is using a directory found on Pocket PC from a WINDEV application.
  • fFileExist is using a file found on Pocket PC from a WINDEV Mobile application.
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
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 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
Aug. 18 2016