Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import sys
- import glob
- GIF_TAG = 'GIF'
- try:
- FOLDER = sys.argv[1]
- except:
- FOLDER = '.' # default to current directory
- for path in glob.glob(os.path.join(FOLDER, '*.jpg')):
- magic = open(path, 'rb').read(len(GIF_TAG))
- if magic == GIF_TAG:
- print 'File is really GIF', path
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement