Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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]
 
PREVIOUS NEXT
Tagged: #obtain #items #directory #subdirectories
ADD COMMENT
Topic
Name
1+3 =