(Information and examples taken from the DroidScript documentation)
The WriteFile method writes a text file to internal or exernal file storage.
Use the option “Append” to append text to the file and the option “Ascii” can be used to write plain ascii files if required (the default is Unicode).
app.WriteFile( fileName, text, mode, encoding );
See also ReadFile
function OnStart() { app.WriteFile( "/sdcard/wftest.txt", "Hello", "Append" ); }