File_ReplaceInFile
Description
Section titled “Description”Searches file for specified text-string and replace it with a new string
Syntax
Section titled “Syntax”File_ReplaceInFile(sFile, sSearchString, sReplacementString, bOnlyFirstOccurence, bIgnoreCase) As Boolean
Parameters
Section titled “Parameters”sFile (String)
Section titled “sFile (String)”Source-file
sSearchString (String)
Section titled “sSearchString (String)”String to replace
sReplacementString (String)
Section titled “sReplacementString (String)”New string
bOnlyFirstOccurence (Boolean)
Section titled “bOnlyFirstOccurence (Boolean)”Only first matching string will be replaced
bIgnoreCase (Boolean)
Section titled “bIgnoreCase (Boolean)”Ignore case
Example
Section titled “Example”If bStatus Then bStatus = File_ReplaceInFile("C:\CapaInstaller.txt", "1999", "2000", False, True)Related functions
Section titled “Related functions”File_AppendToFile File_FindInFile File_GetLineString File_InsertInFile Constants Package Property Variables