|Process Explorer, now a Microsoft product, shows handles between files and processes.|
When a file is locked, which is what Windows does all the time, you then can find out which process it is, then kill or stop it ...
In the program, choose : Find \ Find handle or DLL
Then type (part of) the name of the file.
... or, boot to DOS, and delete the file.