#os #walk #directories #files #python #tutorial #explain #how #use #sub
This is a wonderful and informative class dedicated to the os.walk() method. In this class, we fully explain how this tool works for recursively walking the directories and sub-directories of a file system and manipulating the files thereof. There are multiple very good examples to show you all the amazing things you can do with this function. Get ready!!!
Table of Contents (TOC)
00:27 Definition
01:27 os.walk explored
02:45 os.walk Explored Output of Script
Walking a Directory Tree
03:58 Print Only Files
06:27 Print Only Directories
07:29 Count # of Elements in Directories and Sub Directories
08:45 Print directories selectively Example 1
09:20 Print directories selectively Example 2
10:44 Rename directories
12:50 Rename directories – Using Replace
14:16 Print out files in all dirs and sub dirs except .py
15:02 Get size of file and Last Modification Date
17:22 Get total directory size
19:00 Get total directory size in MegaBytes
20:15 Get size of dirs and files in dirs and sub dirs
22:17 Sort on file size in reverse order based on conditions
The presentation and code may be found on GitHub at the following location:
https://github.com/theyogicoderRI/Pyt...
Watch video 37-PYTHON os.walk() Explained and With Multiple Examples online without registration, duration hours minute second in high quality. This video was added by user Yogi Coder 10 February 2019, don't forget to share it with your friends and acquaintances, it has been viewed on our site 22,144 once and liked it 570 people.