windowsfiledllserverlocked

How can a folder be monitored to see which program/service uses files within it?


the problem is simple, I have a folder with working files, my program stores files/folders within this folder while processing. However, the problem is that I often get an error like "File 'Temp123.temp' cannot be accessed, it is being used by another program." I want to know which program does this.

If I try to use the resource monitor I am not fast enough, as the files are created, used and deleted in a matter of a few seconds and their name is random.

I suspected that the antivirus might be to blame, but even when I deactivate this, the error persists.

Is there a possibility to monitor the whole work-folder and its subfolders to see what programs are using my files?

Thank you so much in advance!


Solution

  • This is a standard function of Microsoft's SysInternals "Process Monitor" aka ProcMon tool