Oct-10-2020, 05:28 AM
(Oct-09-2020, 03:27 PM)bowlofred Wrote: If you want to visit the directories in order as well, you can also sort, but you have to sort the existing list, not return a new one.
Adding
dirs.sort()after the os.walk() call will sort the directories and then the processing of them will be in sorted order as well.
Thanks. Now all my file and directories are sorted in perfect way.