Created
August 8, 2021 06:32
-
-
Save Sanokei/4abdd00640c3303b0a79cd79dd61c540 to your computer and use it in GitHub Desktop.
adding zeros to my png files names when i convert them from videos so that it works with DAIN
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
path = os.getcwd() + '\\images\\' | |
for filename in os.listdir(path): | |
missingNumber = 8 - len(filename) | |
os.rename(path + filename,path + ("0"*missingNumber) + filename) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment