extract file names automatically