Imagemagick Montage Contact Sheets

If you put this into a script and changed P12801{00..90}.jpgto $1 so that you could pass the files names as a parameter, would P12801{00..90}.jpg still expand?