AppendFile

Takes two parameters, FileName, FileData

Description:

Given a local file name path, the TopQuery expression placed into FileData is appended to the disk file. This allows any file type to be created in memory and then appended to a new or existing file on the disk. The opposite of this command is the Top Query function of LoadFile$.

If the Top Query field Error does not already exist when this command is run, it will be created. If it does exist, it will be cleared before the specified Action is run. If an error occurs, a runtime error will be thrown, which may be caught with a Try/Catch block and the error string can be inspected or reported using the Top Query Error field.

Examples:

[New] MyFile
MyFile = LoadFile$ "Work\Input.txt"
MyFile = MCase$ MyFile
AppendFile "Work\Output.txt", MyFile