bingeldac has asked for the wisdom of the Perl Monks concerning the following question:

There seems to be thousands of ways to do what I am trying to do and I was just curious to see what you guys/gals thought. I have a huge list of files. For each of those I want to convert them to 4 different types of codecs using a command line program. However I need a naming scheme as such:

bleh.wav <------ Original File
bleh.a.wav <------ First Conversion
bleh.b.wav <------ Second Conversion

And so on and so on. What is the most efficient way to do this? Keeping in mind that each conversion will be made with a command line call.
Bing

Replies are listed 'Best First'.
Re: A Thousand Ways.
by cwest (Friar) on Oct 24, 2000 at 22:29 UTC
    Use separate directories for each conversion, naming the directories the CODEC name.
    --
    Casey
       I am a superhero.
    
Re: A Thousand Ways.
by quidity (Pilgrim) on Oct 24, 2000 at 22:36 UTC

    I use the following to uncompress shorten files (go etree!) into wave files and mp3 files at the same time. I'm sure you could modify this to suit your needs.

    $shorten_path = '/windows/command/shortn32'; $mp3_encoder = '/mp3/bladeenc/bladeenc'; opendir DIR, '.'; while (my $file = readdir(DIR)) { next unless $file =~ /\.shn$/i; ($file_out = $file) =~ s/\.shn$/.wav/i; `$shorten_path -x $file $file_out`; `$mp3_encoder -quit -quiet $file_out`; }