windows - Python: Finding if a process has file handle to known file -
initial problem: in python , on windows, use win32file.readdirectorychangesw find files have changed. trying find out what process modified them/has handle opened them. of following work: pid, name, full path, etc.
that's top-down approach. i've got half way bottom-up approach using wmi process list. process list found process i'm looking , tried use psutil.open_files() find file handles had opened, doesn't return relevant files i'm looking for. (i.e. winword.exe doesn't have "asdf.docx" in list returned)
how can find process has lock on file found modified readdirectorychangesw?
Comments
Post a Comment