15 lines
346 B
Python
15 lines
346 B
Python
from sys import argv
|
|
from os import rename
|
|
from unidecode import unidecode
|
|
|
|
|
|
for file in argv[1:]:
|
|
rename(file,
|
|
unidecode
|
|
(
|
|
''.join(ch for ch in file
|
|
if ch.isalnum()
|
|
or ch is ' '
|
|
or ch is '.')
|
|
)
|
|
.replace(' ', '_')) |