简体   繁体   中英

What prevents windows from deleting a file that is in use?

Sometimes I try to delete a file with del /f filename and it says "The process cannot access the file because it is being used by another process.". Out of curiosity, what exactly is preventing this from happening? Is it the way that the hardware is set up, or is it more on the software side? And if the only thing preventing this from happening is the software, is there a way to work around it (force windows to delete part of the memory that is being accessed, and if it causes an error in whatever process is using it, just let it crash and exit)? Tried to look online and couldn't find anything.

Thanks

If a software program is loading or reading the file you want to delete, then this error appears. And the only thing you can do, is closing the program and then try to delete the file again..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM