public
Created

Aus dem ~/bin/

  • Download Gist
falsenamekiller.py
Python
1 2 3 4 5 6 7 8 9 10
import os
illegal = list('''!"#$%&\'()*+,/:;<=>?@[\\]^_`{|}~ ''')
repl = "_"
for root,dir,files in os.walk(os.getcwd()):
for fi in files:
for ill in illegal:
if ill in fi:
print "found ", os.path.join(root,fi)
newname = fi.replace(ill,repl)
os.rename( os.path.join(root,fi) , os.path.join(root,newname) )

compare debian package detox

Very old, never used, nice to know thanks ツ

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.