How can I delete a file that is in use by another process?

前端 未结 6 677
野性不改
野性不改 2020-12-10 05:34

When I try to delete a file occurs the following exception:

The process cannot access the file \'\' because it is being used by another process.<

6条回答
  •  感动是毒
    2020-12-10 06:28

    If the file is being used you're out of luck in trying to delete it. I can't tell you based on your code what process might be using the file(s), but try looking here or here or here, or at any of the other questions that show up as related to this one for guidance regarding this issue, and by all means follow the guidance from @Cody Gray about using Process Explorer.

提交回复
热议问题