Have you looked at File.Open ?
From the help file :
Syntax: FileOpen (Connection Name, File Name, cRead | cWrite | cRandom [,cAppend [,cASCII])
cAppend is relevant to Write mode only and it means that if the file already exists then the data will be appended to its end.
If cAppend is not used then a new file will be created whether the file exists or not.
Example:
FileOpen (c1,"Data.txt",cWrite,,cASCII)
FileWrite (c1,"20")
FileWrite (c1,"30")
FileWrite (c1,TextBox1)
FileClose (c1)