(Dec-20-2019, 10:08 PM)lastyle Wrote: for parsing the sub and subsub folders i need to switch to dirwalk, correct ?If use an other walk name os.walk().
import os import re for root, dirs, files in os.walk('.'): for file in files: if re.match(r".*bestfile.*", file): print(file)