File is being used by another process

后端 未结 7 1295
野的像风
野的像风 2021-01-11 21:08

I have a program that roughly does this:

  1. open a file to read from it.
  2. close the file
  3. Start a filewatcher to watch for changes in the file.
7条回答
  •  死守一世寂寞
    2021-01-11 21:58

    You can use this MS utility openfiles to obtain list of opened files and understand who has opened the file.

    openfiles /query
    

    Also it allow to disconnect files opened by network users.

    openfiles /disconnect /id XXXX
    

    If you want use it for local PC you should set Maintain Objects List global flag:

    openfiles /local on
    

    Follow the link to get more details.

提交回复
热议问题