IMAP filtering and searching dictates that my script works as follows: Each night I receive an email with a relevant .doc
file attached to it. My Python script always selects the last (most recent) email, and does certain operations on that .doc
file.
All .doc
files sent daily are named exactly the same.
Issue is: Sometimes the sender neglects to send a new file. The result is that my script does the operation on the wrong file (the one from the day before). If I can somehow check that two files are actually (copies) of the same file, then I can avoid doing the operation.
How is this most easily/effectively achievable in Python?