I am trying to rename all unicode files name in ASCII.
I wanted to do something like this :
for file in `ls | egrep -v ^[a-z0-9\._-]+$`; do mv "$file" $(echo "$file" | slugify); done
But it doesn't work yet.
- first, regexp
^[a-z0-9\._-]+$
doesn't seem to be enough. - second, slugify also transform the extension of the file so I have to cut the extension first and after put it back.
Any idea of a way to do that ?