Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os, hashlib
- md = dict()
- for root, dirs, files in os.walk("/storage/emulated/0/DCIM/Camera"):
- for file in files:
- if file.endswith(".jpg"):
- fpath = os.path.join(root, file)
- cksum = hashlib.md5(open(fpath, 'rb').read()).hexdigest()
- if cksum in md:
- print('Dup: {} of {}'.format(fpath, md[cksum]))
- else:
- md[cksum] = fpath
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement