PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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
Adds the content of a character string at the end of a file.
Versions 21 and later
PHP This function is now available for the PHP sites.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
PHP This function is now available for the PHP sites.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
PHP This function is now available for the PHP sites.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Versions 22 and later
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
Java This function is now available for the Java applications.
New in version 22
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
Java This function is now available for the Java applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
Java This function is now available for the Java applications.
Example
IF fAddText("C:\test\MyFile.txt", "String added at the end of file")
Info("Addition successful")
END
Syntax
<Result> = fAddText(<File Name> , <String to Add>)
<Result>: Boolean
  • True if the addition was performed,
  • False otherwise. To find out the error details, use ErrorInfo associated with the errMessage constant.
<File Name>: Character string (with quotes)
File to use (up to 260 characters). This parameter can correspond to:
  • a file name. This file will be automatically sought in the current directory (returned by fCurrentDir).
  • a file name with its full or relative path. A UNC path can be used.
Caution: This file is modified by fAddText. The file is automatically created if it does not exist.
WindowsLinux This parameter can be in Ansi or Unicode format.
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.
Versions 22 and later
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 22
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).
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).
<String to Add>: Character string (with quotes)
Text that must be added to the file.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230std.dll
Java wd230java.jar
Linux wd230std.so
Android wd230android.jar
Minimum required version
  • Version 18
This page is also available for…
Comments
Exemplo faddText
Exemplo faddText

s_TEXTO_ADICIONAR is string=""
s_TEXTO_ADICIONAR+=CR
s_TEXTO_ADICIONAR+="VOU ADICIONAR"

fAddText("e:\aleva\teste.txt",s_TEXTO_ADICIONAR)

//Blog com video e exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/09/curso-windev-arquivos-009-arquivos.html
https://www.youtube.com/watch?v=1hOJD7zv6fk

De matos AMARILDO
Sep. 01 2016