Generate output filename based on input filename.