Advertisement
Siorai

Untitled

Dec 27th, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. def extractDatBitch(wootdir):
  2. WhereShitsGoing = "D:\PlexWatchFolder"
  3. for path, dicks, stuff in os.walk(wootdir):
  4. for EachFile in stuff:
  5. filepath = os.path.join(path, stuff)
  6. if rarfile.is_rarfile(filepath):
  7. print("I think I got one... %s") % filepath
  8. try:
  9. print("Maybe... maybe...") % filepath
  10. with rarfile.RarFile(filepath) as rf:
  11. rf.extractall(path=WhereShitsGoing)
  12. except:
  13. print("Well %s was an archive, it's probably a multipart and you can only exract that first one.") % filepath
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement