It works!

Sample run on C code:
files.bat: C
prog0.txt: C
prog1.txt: C
prog10.txt: C
prog11.txt: C
prog12.txt: C
prog13.txt: C
prog14.txt: C
prog15.txt: C
prog16.txt: C
prog17.txt: C
prog18.txt: C
prog19.txt: C
prog2.txt: C
prog20.txt: C
prog21.txt: C
prog22.txt: C
prog23.txt: C
prog24.txt: C
prog25.txt: C
prog26.txt: C
prog27.txt: C
prog28.txt: C
prog29.txt: C
prog3.txt: C
prog4.txt: Perl
prog5.txt: C
prog6.txt: C
prog7.txt: C
prog8.txt: C
prog9.txt: C