Paul Rubin <http://phr.cx@NOSPAM.invalid> writes: > fmt = "new_dir%0%d" % len(str(num)) Typo, that was supposed to say "new_dir%%0%d" ...