Tools + Auto Format would be a good idea, before you post ALL of your code.
Why have cpt and taille_cph? They appear to serve the same purpose.
Sorry but i don't understand your question " Why is the size of that file in bytes relevant? " .
The number of times that this while loop:
while(taille_cph <= taille_cph_MAX){
myFile = SD.open("crea_cph.txt", FILE_READ); // ouvrir "crea_cph.txt"
Chaine_stockage = myFile.read();
myFile.close(); // fermer "crea_cph.txt"
sprintf(nom, "Svg_ph%d.txt", cpt);
myFile = SD.open( nom , FILE_WRITE);
myFile.println(Chaine_stockage,DEC);
myFile.close();
cpt++;
taille_cph++;
}
iterates is based on taille_cph_MAX, which is initialized:
taille_cph_MAX = myFile.size();
Therefore, the number of times that the loop iterates is based on the size of some file. A tiny file means a few iterations. A huge file means lots of iterations.
I don't see how the size of some mysterious file is relevant.