I have a file of the following type:

text1.txt
1
text2.txt
20

how do I make it such that it will read the 'text.txt' as 'text' and the numbers as integers.

andrew