import os if __name__ == "__main__": for root, dirs, files in os.walk("/home/url/repos/ou-python"): for file in files: full_path = os.path.join(root, file) if os.path.getsize(full_path) > 100: print(full_path, os.path.getsize(full_path))