Name of files

I hope it will help you for understand.

Posting all of your code would be even better.

The value being stored in taille_cph_MAX is the size of the file, and the while loop is supposed to be opening the original file, reading a byte, and writing that byte to another file that number of times.

Instead, the while loop is opening the file, reading a byte, and writing it to a new file, that number of times. If the original file is 100 bytes, the while loop will create 100 files with one byte each. I'm pretty sure that this is not what you want to do.

You need a while loop to find a file that does not exist. Then, inside that loop, when you find one, you need another loop to copy the data from the old file to the new file.