If you are generating a lot of files in Xojo to be downloaded, it makes sense to zip your files, so that the end-user has only to download one file.
You can easily achieve this with MonkeyBread’s MBS Plugin: ArchiveWriterMBS, which you can download here.
The following code is showing how to create 3 text files in-memory. These files are then getting compressed in-memory and then automatically downloaded. This project is for Xojo Web 2.0 but will work as well for Desktop Apps with a few changes.
You need to create the following properties in Xojo’s IDE: