Fix broken Umlauts in Filenames

From S23Wiki
Jump to: navigation, search

rename.sh:

[pre] for i in *

 do
 x=$(echo $i | iconv -f utf8 -t ascii//TRANSLIT -c)
 if [ "$i" != "$x" ];
 then
   echo "$i --TO-- $x"
   #mv "$i" "$x"
 fi
 if [ -d "$x" ]; then
   cd "$x"
   echo "cd to $x"
   /path/to/rename.sh
   cd ..
 fi

done [/pre]