Writes text to a file on the agent machine, either by appending text to an existing file or by creating a new file if none exists. You enter the text to write to the file, then enter the full path and file name on the agent machine the text will be written to. The folder has to already exist. You can optionally overwrite the entire file with the text you have entered if the file already exists.
Operating systems supported: Windows, OS X, Linux.
Note: This command uses "echo" command utility to create the file. Any characters not supported by echo must be escaped as shown here:
Note: Quotation marks ('single' or "double") are not supported when using writeTextToFile on an OS X agent machine.
Example
writeTextToFile("#appsettings#", "#vagentconfiguration.agenttempdir#/appsettings.txt", false, "All Operating Systems", Halt on Fail")
Example
writeTextToFile(#appsettings#, #vagentconfiguration.agenttempdir#/appsettings.txt, false, All Operating Systems, Halt on Fail)