Hi i'm trying to rename my files in a directory from (test.jpeg, test1.jpeg, test2.jpeg etc...) (People-000, People-001, People-002 etc...)
but I haven't found a good way to do that anywhere online. I'm kinda new to python but if I figured this out it would be very useful.
If you don't mind correspondence between old and new names:
But if it is important that ending number of the old and new file name corresponds, you can use regular expressions:
Using regular expressions instead of string index has the advantage that it does not matter the file name length .