I have files like: 00001.jpg 00002.jpg . . . 01907.jpg
I want to add some files to this directory which are named the same. But their names should continue like 01908.jpg 01909.jpg . . 12906.jpg
I couldn't manage to do that. How can i make this happen?
Thanks a lot:)
I tried
import os
files=[]
files = sorted(os.listdir('directory'))
b=len(files)
for i in range(0,b):
a=files[i]
os.rename(a,(a+1))
print (files)