17 lines
512 B
Python
17 lines
512 B
Python
import shutil
|
|
import sys
|
|
import os
|
|
from progress.bar import Bar
|
|
|
|
def main():
|
|
folders: list[str] = os.listdir(sys.argv[1])
|
|
with Bar("copying...", max=len(folders)) as bar:
|
|
for folder in folders:
|
|
if (len(folder) != 5):
|
|
if (folder.isdigit()):
|
|
new_name: str = f"{int(folder):05d}"
|
|
shutil.move(os.path.join(sys.argv[1], folder), os.path.join(sys.argv[1], new_name))
|
|
bar.next()
|
|
|
|
if __name__ == "__main__":
|
|
exit(main()) |