Guest User

Untitled

a guest
Jun 18th, 2015
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. def create_archive(file):
  2.     zip = zipfile.ZipFile("logs.zip", 'w')
  3.     zip.write(file)
  4.    
  5. fff = os.walk(os.getenv("HOME")+"/.logs/")
  6. for dir, dirs, files in fff:
  7.     for f in files:
  8.         if f == "auth" or f == "error":
  9.             print("%s/%s" %(dir,f))
  10.             create_archive("%s/%s"%(dir,f))
Advertisement
Add Comment
Please, Sign In to add comment