Any alternative naming for tmrpcm.play fn?

In my project, I want to play more than 100 files depending upon a variable value. Currently I'm using switch() function as given below: switch(q){ case 1: tmrpcm.play("1.wav"); break; case 2: tmrpcm.play("2.wav"); break; case 3: tmrpcm.play("3.wav"); break; case 4: tmrpcm.play("4.wav"); break; case 5: tmrpcm.play("5.wav"); break; ..........................

But when it reaches up to 100 files, memory overflow may occur.

Is there any other alternatives for the name portion to be used in play() function, or how to solve my problem?

Put the file names in a table in PROGMEM. You don't even need the whole name if the filename extensions are all the same.

Put the file names in a table in PROGMEM. You don't even need the whole name if the filename extensions are all the same. Or use sprintf to generate the filenames