Dec-06-2019, 10:31 PM
(This post was last modified: Dec-06-2019, 11:23 PM by arthur_cti.)
@snippsat and @michael1789
This os.rename does not seem to work, would you know a solution to these problems?
I got a solution. I'll post, if anyone can improve, post here too. Thank you! My first contact with the community was very productive. Python is the future.
This os.rename does not seem to work, would you know a solution to these problems?
import os path = 'C:/Users/Name/Downloads/Test' for i in range(ord('a'), ord('f')+1): os.rename(r'{path}ppl15{chr(i)}.png', r'{path}ppl139.{i}.png') print('Finish')
I got a solution. I'll post, if anyone can improve, post here too. Thank you! My first contact with the community was very productive. Python is the future.
import os for i in range(ord('a'), ord('f')+1): os.rename(r'C:/Users/Name/Downloads/Teste/'+'ppl15'+ chr(i)+'.'+'png', 'C:/Users/Name/Downloads/Teste/'+'ppl139'+'.'+str(i-96)+'.'+'png') print('Finish')