I really tried figuring out this one, but without success. I downloaded a course materials, and it's in the following format:
D:\course\day1\1.1\video1.mp4,..,video20.mp4
..
D:\course\day1\1.9\video1.mp4,..,video19.mp4
D:\course\day1\1.10
..
D:\course\day1\1.20
..
D:\course\day5\5.1\video1.mp4,..,video15.mp4
..
D:\course\day1\5.19\
Now, because I have many video files, 150+ each day - I wanted to merge them into a single .mp4 file of each day. So I had an external program but the way it shows the file is different than the OS for example:
video1, video10, video2 the 10 is not after 9 but after 1 lol it's the same with the subfolders, for example 5.1 and 5.10. So I wanted to rename them using a python code but when I entered them into a list, it's the same with python as it was in my external tool.
my idea was to rename the files to a.mp4 and then a += "a" for the second file. It worked great, I don't mind having 150 files all called a up to the last file which was 150 "a". but as mentioned, my issue was that python saw the files and sub folders as 1 and then 10 instead of 2.
Hope you understand.. I wanted to sort the sub folders and files in a good order and then rename them.