写真のEXIF(作成日)をチェックする

import glob
import os
import subprocess

files = glob.glob('./*')

for filename in files:
    cmd = """exiftool -a -u -g1 """ + filename + """ | grep "Create Date" | head -n 1 | awk '{split($0,a,":"); print a[2]"/"a[3]"/"a[4]":"a[5]":"a[6]}'"""
    res = subprocess.check_output(cmd, shell=True)
    print(res)

実行結果

➜  format1 python check_if_exif.py
b' 2016/04/17 09:09:39\n'
b' 2018/04/01 12:06:42\n'
b' 2016/04/17 09:09:24\n'
b' 2017/12/21 15:29:24\n'
b' 2016/04/30 18:10:16\n'
b' 2016/04/03 15:05:10\n'