Initial upload

This commit is contained in:
Mueez Khan 2021-03-25 08:58:09 -04:00 committed by GitHub
commit bf8a8f965d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 77 additions and 0 deletions

13
bulk_renamer.py Normal file
View file

@ -0,0 +1,13 @@
import os
def main():
i = 0
path = input("Input a path with png files to rename: ").replace("\\", "/") + "/"
for filename in os.listdir(path):
my_dest = f"img_{str(i)}.{filename.rsplit('.')[-1]}"
my_source = path + filename
my_dest = path + my_dest
os.rename(my_source, my_dest)
i += 1
main()