Why every time that you get stuck in something, you immediately assume that is a quickbms problem?!? Well, I don't kown about bms, but in general programming speaking, you are trying to do something against the logic, this your code will fail in any known programing language.
Every loop has a condition to ended its ciclo, in you case, the loop will ended when i = FILES, you can't override this, the only thing you can do is force to exit, breaking this loop, aluigi showed this to you a few days ago here
Edit1: aluigi just answered...
Edit2: I think that you don't understand that is the "next" is part of the "for" instruction, and not another common instruction.
so. i need to creat a dumper and i need to count header first for some reason
how can i do it when i cant put two different cycle? because last file will lost and i did it with calculating the header of first file and header of next file