I have a directory with these .txt files:
1.txt
2.txt
3.txt
...
100.txt
138.txt
...
100.txt
1923.txt
If I list the directory with python (usign glob or os.listdir()), it produces such result:
adaptedUsers = sorted(glob.glob(dirName + '*.txt'))
1.txt
10.txt
1000.txt
..
2.txt
..
However I want to list the files in sorted with their numeric value as in windows directory files listing. How can I do this without renaming the files?