How can I make a python script that creates a .txt file with the process details (specially the PID) when this process opens an specific file?
E.g.: a process with PID 4574 opens the file "print_pid.txt", and after this event, my script will create a .txt file that has the process PID that just accessed this "print_pid.txt" file (4574).
PS: I'm using Windows 10