os.walk file with path code example
Example: python get file path from in os.walk
shpfiles = []
for dirpath, subdirs, files in os.walk(path):
for x in files:
if x.endswith(".shp"):
shpfiles.append(os.path.join(dirpath, x))
shpfiles = []
for dirpath, subdirs, files in os.walk(path):
for x in files:
if x.endswith(".shp"):
shpfiles.append(os.path.join(dirpath, x))