Click to See Complete Forum and Search --> : Perl script for audio files....


Linux~Powered
08-29-2004, 08:01 PM
I don't know Perl so i came here for some help. I need a script that would convert all files from .mp3 to .cdr in a dir with this command...

sox nameoffile.mp3 nameoffile.cdr

can anyone help me out here?

bwkaz
08-30-2004, 08:16 PM
#!/bin/bash

cd /path/to/the/directory

for file in *.mp3 ; do
sox "$file" "$(basename "$file" .mp3).cdr"
done Perl? Hah! :p

Linux~Powered
09-02-2004, 04:07 AM
Cool! Thank you! :cool: