pad folder names
This commit is contained in:
@@ -190,8 +190,9 @@ if method == "regexp":
|
|||||||
(outFolders, uniqlabel, matcher) = regexmatches(inFiles, options)
|
(outFolders, uniqlabel, matcher) = regexmatches(inFiles, options)
|
||||||
input("correct?")
|
input("correct?")
|
||||||
else:
|
else:
|
||||||
|
padding = "{:0" + str(len(str(options.n))) + "d}"
|
||||||
for x in range(options.n):
|
for x in range(options.n):
|
||||||
outFolders.append(os.path.join(options.path, "folder" + str(x + 1)))
|
outFolders.append(os.path.join(options.path, ("folder-" + padding).format(x + 1)))
|
||||||
|
|
||||||
for x in outFolders:
|
for x in outFolders:
|
||||||
if not os.path.isdir(x):
|
if not os.path.isdir(x):
|
||||||
|
|||||||
Reference in New Issue
Block a user