in reply to using the system command

As others already pointed out, there's no reason to use hundreds of files, you can easily concatenate them, either on the fly or afterwards... So use a sequence number, time stamp or whatever you like.

I would like to make a few general observations about your code:

Paul