My question is : How to sort files by name and delete in Python.
What i want and mean is:
In TextFolder have:
a1.txt
a2.txt
a3.txt
a4.txt
a5.txt
a6.txt
a7.txt
a8.txt
a9.txt
a10.txt
i wan sort the file by name and
i only wan keep 10 files only in the folder. So...
when a11.txt available, then it will delete a1.txt.
when a12.txt available, then it will delete a2.txt.
Hope you guys can help me out in this, thx.