Basil, et al -- ...and then Basil Chupin said... % % On 14/11/13 12:43, Carl Hartung wrote: ... % > % >Below is the simple looping script that I use. YMMV depending upon your % >hardware but I always set it up to read the source from one physical % >drive while writing to another ... it's faster and less stress on the % >drives. % > % >- - - - - 8< - - - - - % >>#!/bin/bash % >># for all .flv files, extract .mp3 audio content % >>FILES="*.flv" % >># for loop read each file % >>for f in $FILES % >>do % >>INF="$f" % >>OUTF="/TARGET/PATH/$f.mp3" Change this line to BASE=`basename "$F" .flv` OUTF="/TARGET/PATH/$BASE.mp3" % >>ffmpeg -i $INF $OUTF Change this line to ffmpeg -i "$INF" "$OUTF" ... % % Many thanks for this, Carl! Something which works! But with qualifications. You should always season to taste :-) % ... % But even in 12.3 there is a vital requirement: the file names cannot % have blank spaces in them. That is, Men At Work will not be processed % (No such file or directory) but Men_At_Work, for example, will get % converted. Aside from the fact that BlanksAreEvil, just quote them. See the second change above. % % And lastly, but not a show-stopper, is that '.mp3' is appended to the % name of the .flv file so that the new name comes out as Men_At_Work.flv.mp3. You just need to strip off the old extension before adding the new. See the first changes above. Admittedly, one might care what source was used to make what MP3 file, so leaving the .flv in could be good, but it's also easy to strip if you wish. % % Thanks again for the above script. % % (And now to go thru ~200 files and rename them not to have any blanks in % their name :-) .) While I of course love that, realistically you needn't. % % BC HTH & HAND :-D -- David T-G See http://justpickone.org/davidtg/email/ See http://justpickone.org/davidtg/tofu.txt