I'm working on a script to automate some mp3 downsampling.
Some of the file to be converted have spaces in the filenames which is a
problem for my script.
Either of two possible solutions but I've not managed to get my head
around either of them.
1. A script to rename all files and directories recursively below
$basedir to remove the space.
2. A way to pass the full quoted pathname to lame.
I've not really looked at 1 much and just can't get 2 to work. The quotes
don't end up on the lame command line even though I've escaped them
This will obviously fail if any part of the path/filename has a space in
it.
for mp3file in `find \$cpath -name "*.mp3" | sort`
{
lame --preset cbr "$kbps" "$mp3file" "$mp3file.conv"
so I tried:Quote:}
for mp3file in `find \$cpath -name "*.mp3" | sort`
{
lame --preset cbr "$kbps" "\"$mp3file\"" "\"$mp3file.conv\""
Is 2 failing because of lame or is the command line it produces broken?Quote:}
I'm suspecting (fairly sure actually) that it's the for/find line which is
the problem.
--
Dave
I don't know what I'm doing. That' why I'm here.