how to recursively go through all the directories python code example Example: python recursively print directory for root, subdirs, files in os.walk(rootdir):