minor changes

This commit is contained in:
secret_dude 2021-06-02 01:33:24 +02:00
parent c6df15c609
commit e8db800831

23
changeFilenames.py Normal file
View File

@ -0,0 +1,23 @@
# Pythono3 code to rename multiple
# files in a directory or folder
# importing os module
import os
path = 'neural_network\\images\\potatoes\\'
def main():
for count, filename in enumerate(os.listdir(path)):
dst = 'potato' + str(count) + ".jpg"
src = path + filename
dst = path + dst
# rename() function will
# rename all the files
os.rename(src, dst)
# Driver Code
if __name__ == '__main__':
# Calling main() function
main()