Remove Invalid characters in Filename.

2010-01-10 1 min read Linux Photo

Sometimes I end up having some invalid characters in filename like ? & and so on.

So simple bash script to get rid of them:

for i in `find . -type f`
do
echo $i
mv $i `echo $i |tr ? _|tr = _ |tr ’&’ ’_’`
done <a name="more">

comments powered by Disqus