The "problem" is that it excecutes only if there is only 1 wav file inside the directory. It is more than obvious that I must read my @ss off and I'm excited about that. Can I ask for some pointers for what do I have to look for to be able to excecute this program for a number of wav files (>1)? (not a solution, just for a more general direction)

I also would love some criticism about how correct is the code. (again, I know it's not much ).