Answers for "obtain items in directory and subdirectories"

0

obtain items in directory and subdirectories

from os import walk
from os.path import join
path = 'C:\\'
# Creates list of the items in directories (+subdirectories)
items = [join(root, file) for root, subdirs, files in walk(path) for file in files]
Posted by: Guest on April-17-2022

Code answers related to "obtain items in directory and subdirectories"

Python Answers by Framework

Browse Popular Code Answers by Language