37-PYTHON os.walk() Explained and With Multiple Examples

Опубликовано: 10 Февраль 2019
на канале: Yogi Coder
22,144
570

#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...


Смотрите видео 37-PYTHON os.walk() Explained and With Multiple Examples онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Yogi Coder 10 Февраль 2019, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 22,144 раз и оно понравилось 570 людям.