Page tree
Skip to end of metadata
Go to start of metadata

Description

Inserts string in file


Syntax

File_InsertInFile(sFile, sSearchString, sInsertString, bOnlyFirstOccurence, bIgnoreCase, sMode) As Boolean


Parameters

sFile (String)

Filename

sSearchString (String)

Pre-string to find

sInsertString (String)

String to insert before or after pre-string

bOnlyFirstOccurence (Boolean)

Insert by first occurrence (TRUE or FALSE)

bIgnoreCase (Boolean)

Ignore case (TRUE or FALSE)

sMode (String)

Insert-mode. sMode can be one of following values: 'TOP', 'BOTTOM', 'BEFORE', 'AFTER'


Example

VBScript
If bStatus Then bStatus = File_InsertInFile(gsWindowsDir & "\WIN.BAK", "", gsWindowsDir & "\WIN.BAK was created " & Now, True, True, "TOP")

Scripting Guidelines


Related functions

File_AppendToFile File_FindInFile File_GetLineString

  • No labels