type cast filename to int