Remove Spaces from Filenames
Posted: August 23, 2007 Filed under: NEZzen Leave a comment »If you’ve ever wanted to remove the spaces from all the filenames in a directory and replace them with underscores, here’s how to do it with bash.
for n in *; do
mv "$n" `echo $n | tr ' ' '_'`
done
May come in handy one day.
Advertisement
