Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

get files in directory and subdirectory

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]
Comment

PREVIOUS NEXT
Code Example
Python :: python -c 
Python :: python web framework 
Python :: string python 
Python :: how to improve accuracy of random forest classifier 
Python :: python get text of QLineEdit 
Python :: get webpage python 
Python :: check if list is in ascending order python 
Python :: fizz buzz 
Python :: ipython history 
Python :: dataframe multiindex 
Python :: slicing of strings in python 
Python :: find & replace in csv file 
Python :: pdf to string python 
Python :: pytorch dill model save 
Python :: python string encode 
Python :: python in stack implementation 
Python :: Get more than one longest word in a list python 
Python :: defaultdict python dict inside dict 
Python :: plot path in pillow python 
Python :: download files from url in flask 
Python :: standard deviation in python numpy 
Python :: python get attribute value with name 
Python :: switch case dictionary python 
Python :: how to get only one column from dataset in python 
Python :: remove common rows in two dataframes pandas 
Python :: split string to list 
Python :: lambda function if else in python 
Python :: django generate openapi schema command line 
Python :: how to chang your facebook name 
Python :: django jsonresponse 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =