Skip to content

Instantly share code, notes, and snippets.

@l-modolo
Last active September 18, 2019 17:28
Show Gist options
  • Save l-modolo/4f27f22d1876c9df52f4 to your computer and use it in GitHub Desktop.
Save l-modolo/4f27f22d1876c9df52f4 to your computer and use it in GitHub Desktop.
remove all non ASCII character from file/folder names in a file tree
#!/bin/sh
# remove all non ASCII character from file/folder names in a file tree
convmv -f utf8 -t ASCII -r . 2>&1 | grep ascii | perl -pe "s/ascii doesn't cover all needed characters for: //g" | awk '{system("mv "$0" \"$(echo "$0" | uconv -t ASCII -x nfd -c )\"")}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment