I have a directory of folders and subfolders that I need to search through to find a certain folder name, \"old data\", so that I can delete the files within \"old data\" and de
import os
import shutil
for root, subdirs, files in os.walk('C:/directory'):
for d in subdirs:
if d == "old data":
shutil.rmtree(os.path.join(root, d))
shutil.rmtree will delete the entire "old data" directory