If you want to do that in perl:
See glob for globbing, and system for executing and maybe perlsyn for foreach syntax
Regards,
Updated to double quote vars (thanks to cdarke)
Comment on Re: Opening files from a directory and batch processing into new files