I've looked around, and there are a lot of posts very similar to this but I can't seem to find an answer that will work for what I need.
I have a big list of files with different extensions that I want to rename to numbers. For example
SomeFileName1.jpg
SomeFileName2.gif
SomeFileName3.mkv
changed to:
1.jpg
2.gif
3.mkv
I want to keep the extensions the same. Only the name should change to 1,2,3 etc.
A while ago I found some code that renamed all the files (don't have the code anymore), but it renamed them in the wrong order. "SomeFileName3.mkv" became "1.mkv" instead of "3.mkv" for example. I'm not sure if I need to sort them first somehow? I'm not very good at this kind of thing so I could really use some help. Thanks