@@ -0,0 +1,807 @@
+#!/usr/bin/python%0A%0Aimport subprocess%0A%0Aclass ScriptException(Exception):%0A    def __init__(self, returncode, stdout, stderr, script):%0A        self.returncode = returncode%0A        self.stdout = stdout%0A        self.stderr = stderr%0A        Exception.__init__('Error in script')%0A        %0Adef run_bash(script):%09%0A%09proc = subprocess.Popen(%5B'bash','-c',script%5D,%0A%09%09stdout = subprocess.PIPE, %0A%09%09stderr = subprocess.PIPE,%0A%09%09stdin = subprocess.PIPE)%0A%09stdout, stderr = proc.communicate()%0A%09if proc.returncode:%0A%09%09raise ScriptException(proc.returncode, stdout, stderr, script)%0A%09return stdout, stderr%0A%0Adef main():%0A%09remove_spaces = %22find . -depth -name %5C'* *%5C' %5C%0A%09 %7C while IFS= read -r f ; do mv -i %5C%22$f%5C%22 %5C%22$(dirname %5C%22$f%5C%22)/$(basename %5C%22$f%5C%22%7Ctr %5C' %5C' _)%5C%22 ; done%22%0A%09run_bash(remove_spaces)%0A%0Aif __name__ == %22__main__%22:%0A%09main()%0A

Remove spaces in dirnames