diff --git a/cleanfilenames.py b/cleanfilenames.py old mode 100644 new mode 100755 index a3f28c2..e77fa7d --- a/cleanfilenames.py +++ b/cleanfilenames.py @@ -2,7 +2,7 @@ import sys, re, os -errortxt = " mydirectory\nRenames _all_ strange filenames in a given directory. No other options, edit the source." +errortxt = " /some/directory\nRenames _all_ strange filenames in a given directory. No other options, edit the source." count = 0 # Check for one single commandlineparameter @@ -13,8 +13,10 @@ except: # Regex to eliminate everything not belonging into a filename # Ey, this is not zombiecode! -# whitelist="[^a-z.A-Z0-9äöüÄÖÜß_+-]" # All trash eliminate -# whitelist="[^a-z.A-Z0-9äöüÄÖÜß_+-][^a-z.A-Z0-9äöüÄÖÜß_+-]*" # Reduce trash to "-" + +# whitelist = "[^a-z.A-Z0-9äöüÄÖÜß_+-]" # All trash eliminate +# whitelist = "[^a-z.A-Z0-9äöüÄÖÜß_+-][^a-z.A-Z0-9äöüÄÖÜß_+-]*" # Reduce trash to "-" + whitelist = "[^a-z.A-Z0-9äöüÄÖÜß_+-][^a-z.A-Z0-9äöüÄÖÜß_+-]*" cutminus = "^-+"