Remove Invalid characters in Filename.

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`
echo $i
mv $i `echo $i |tr ? _|tr = _ |tr \’&\’ \’_\’`

This site uses Akismet to reduce spam. Learn how your comment data is processed.