SBM ModScript Reference → Programming SBM ModScript → Extension Functions → Ext.WriteTextFile()
(SBM On-Premise only) Writes the string contents to the file referred to by string fileName, overwriting the file's previous contents.
Parameter | Type | Description |
---|---|---|
fileName |
string |
Specifies a fully-qualified path and file name. The fileName can be any valid file path, including a path to a network device. Note: This function may fail due to permissions
settings. Verify that accounts that will execute the script have permission to
write to the destination file.
|
contents |
Variant |
The value to be written to the file. |
Type | Description |
---|---|
Variant |
Returns the string parameter "contents". |
SBM ModScript version: 11.3.
The file is opened, written, and closed; if it doesn't exist, it is created first. Concurrent scripts cannot access the file for reading or writing until this write operation finishes. To append to a file's contents rather than overwrite them, refer to Ext.AppendTextFile().
Copyright © 2007–2018 Serena Software, Inc., a Micro Focus company. All rights reserved.