Oops... forgot the reply-all on this one... sm On 7/15/07, Sam Martin wrote: > You could loop over the files with something along the lines of: > > for i in *.flac ; do <command using "$i" as filename>; done > > As a side note, I'd probably also pipe the output of "flac -d > <somefile>" directly to lame, avoiding messing with the intermediate > *.wav files. Something like > > <code> > for i in *.flac > do > filebase=`basename "$i"` > flac -d -o - "$i" | lame -V0 - > "$filebase.mp3" > done > </code> > > ought to suffice. I haven't tried it, but it should work with some tinkering. > > Alternatively, I've had good luck with MP3FS > (http://mp3fs.sourceforge.net/), which lets you mount a tree of flac > audio files as a parallel tree of "virtual" mp3 files. You can then > copy the mp3 files (e.g., to an ipod), at which point they're encoded > from the flac sources. > > sm > > > > On 7/14/07, Jordan Peacock wrote: > > Working on a script so I can select multiple folders containing flac > > files, and have them automatically encode the flac files to .mp3 V0 > > for my brother's ipod. I'm close to having things working, just > > missing this last bit. > > > > Where it says "lame -V 0" it wants two parameters: source file and > > destination file. Unfortunately, that is singular, and it doesn't seem > > to like the wildcard in destinations. Any ideas for alternatives? I'm > > not a programmer, but I've stumbled through some programs. > > > > Here's the code as it stands (untested bits commented out). > > > > #!/bin/bash > > IFS=" > > " > > for i in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS > > do > > if [ -d "$i" ] > > then > > cd "$i" > > flac -d *.flac > > lame -V 0 *.wav *.mp3 > > # rm -f *.wav > > # cd .. > > fi > > done > > > > > > -- > > > > Jordan Peacock > > hewhocutsdown at gmail.com > > hewhocutsdown.blogspot.com > > > > _______________________________________________ > > TCLUG Mailing List - Minneapolis/St. Paul, Minnesota > > tclug-list at mn-linux.org > > http://mailman.mn-linux.org/mailman/listinfo/tclug-list > > >