I have a directory containing about 200 mp3 files. They are strangely numbered, such that during playing they are executed in a rather unpredictable order. That is how few of them are called to give a short example:
lst1 =
{"01_04_49.mp3", "01_04_50.mp3", "01_04_51.mp3", "02_01_01.mp3",
"02_01_02.mp3", "02_01_03.mp3"}
I would like to rename them using Mathematica into something like
lst2 = {"1.mp3", "2.mp3", "3.mp3", "4.mp3", "5.mp3", "6.mp3"}
in the same order as they appear in the list above.
Any idea of how to do this?
lst1
is already in the desired order? Assuming that, tryMapIndexed[RenameFile[#1, IntegerString[#2[[1]]] <> ".mp3"] &, lst1]
. $\endgroup$