Initial upload
This commit is contained in:
commit
bf8a8f965d
7 changed files with 77 additions and 0 deletions
13
bulk_renamer.py
Normal file
13
bulk_renamer.py
Normal 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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue