i want to make code using python from which i can count the directories which is in a directory and the files in it.i am getting number of files and filenames by using listdir() function and count also by using len(data) function.but i have directories in a directory & in that i have files. i am using below code.<br>please guide me for that <pre><br>
import os img_folder_path = ("C:/Users/Uname/Desktop") dirListing = os.listdir(img_folder_path) print(dirListing) print(len(dirListing))
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)