iterate over files with basename and extension