Đạt Michio
New member
How do you check if a file has been modified in Python?
Answer
Monitoring if a file has changed in Python
Answer
Monitoring if a file has changed in Python
- import os if os. path. exists(“yourpath here”): print “Yep – found it”
- import os if os. path. isfile(“your path to file”): print “that’s a file alright”
- import md5 hash1 = md5. new() hash1. …
- import os, time moddate = os. stat(“filepath”)[8] # there are 10 attributes this call returns and you want the next to last.