Applies to TestComplete 14.70, last modified on October 26, 2020
This method is obsolete. See the Remarks section below.

Description

The SaveStrToFile method creates, opens or rewrites the file FileName, copies the string specified by the Str parameter to it and closes that file.

Declaration

BuiltIn.SaveStrToFile(FileNameStrAppendToFile)

FileName [in]    Required    String    
Str [in]    Required    String    
AppendToFile [in]    Optional    Boolean Default value: False   
Result None

Applies To

The method is applied to the following object:

Parameters

The method has the following parameters:

FileName

The full path to the file to which the string will be saved. If the specified file does not exist, it will be created. If the file already exists, use the AppendToFile parameter to specify whether to append the string to the end of the file or to rewrite the file.

Str

The string you want to copy to the file FileName.

AppendToFile

Specifies what this method will do if the file specified by the FileName parameter already exists. In this case, if AppendToFile is True, then SaveStrToFile will append the Str string to the end of the file. If AppendToFile is False (this is the default parameter value), SaveStrToFile will rewrite the existing file.

If FileName does not exist, it will be created regardless of the AppendToFile parameter value.

Result Value

None.

Remarks

This method is obsolete. It is supported for backward compatibility only. To save a string to a file, use the aqFile.WriteToTextFile or aqFileInfo.WriteToTextFile method.

See Also

WriteToTextFile Method
WriteToTextFile Method

Highlight search results