I gave you links to the file handling routines in my answer to
your earlier question[
^], but you still have not explained which part of this you do not understand.
Generating multiple files is merely a matter of creating loops, and repeating a sequence of create, read/write, close operations.