Skip to content

Instantly share code, notes, and snippets.

@mosburn
Created May 14, 2014 22:52
Show Gist options
  • Save mosburn/072dd5a86d3a88c3b5b2 to your computer and use it in GitHub Desktop.
Save mosburn/072dd5a86d3a88c3b5b2 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
from os import listdir, getcwd, remove
from os.path import isfile, join
mypath = getcwd()
onlyfiles = [ f for f in listdir(mypath) if isfile(join(mypath,f)) ]
for file in onlyfiles:
fpath = join('/home/mosburn/Downloads/', file)
remove(fpath)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment