Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Clean downloads
import glob
import os
import os.path
import shutil
mydir = "/Users/jclaudius/Downloads/"
filelist = glob.glob(os.path.join(mydir, "*"))
for f in filelist:
if os.path.isdir(f):
shutil.rmtree(f)
else:
os.remove(f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment