It isn't clear precisely what help you require. Here are some places to start:
- You can use
os.walk
,os.listdir
orglob.glob
to generate a list of files. - You can use
os.stat
to determine the last modified time. - You can use
hashlib.md5(open(fname).read()).hexdigest()
to get the md5. - You can use
os.utime
to set the modified time of a file. - You can use
json.dump
andjson.load
to persist the mtimes from one run to the next (there are other alternatives)