Special characters in filenames
I have a directory full of wav files I need to convert using lame. If I try the obvious 'lame *.wav' I get an error because the filenames globbed with *.wav are full of spaces and dashes. using "*.wav" or '*.wav' both fail.
I know I've seen this before, but can't find an answer. Can you help? Thanks |
Try a batch rename of the files to replace spaces with underscores.
cd to the directory with the .wav files, then use this command: for i in *.wav; do mv "$i" `echo $i | tr ' ' '_'`; done Notice the back-ticks around the echo command. |
OK you stimulated my memory. I think I did before this without renaming by using
for i in (*.wav); do lame -V0 "$i"; done Now if I can figure out how to pick out the extension so I could pass file + extension then just filename. Thanks for the help. Maybe I'll remember next time |
All times are GMT -5. The time now is 09:57 AM. |