A directory tree looks like this:
DirA--
|
-- Map
|
-- Fig--
|
--file.png
|
-- Data--
|
-- file.xls
|
-- file.csv
There are multiple directories, containing multiple files. I would like to get full path to those files that are found in Data
directory only.
This is what I have so far:
dirlist = []
thisdir = os.getcwd()
for root, dirs, files in os.walk(thisdir):
for d in dirs:
if d.startswith("Data"):
dirlist.append(os.path.join(root, d))