I created one python script this will inform me if some files got changed in the directory and it is working, but i need to have an another message if a file got modified and is still open "modified but still in use" some thing like that.can any one please help
import os, time
path_to_watch = "C:\\Users\\u104810\\Desktop\\New folder"
before = dict ([(f, None) for f in os.listdir (path_to_watch)])
while 1:
time.sleep (10)
after = dict ([(f, None) for f in os.listdir (path_to_watch)])
added = [f for f in after if not f in before]
removed = [f for f in before if not f in after]
if added: print ("Added: ", ", ".join (added))
if removed: print ("Removed: ", ", ".join (removed))
before = after