The operating system blocks the file and you will not be able to change it.
This type of situation usually occurs when the file is being used by another user, even on the same computer, or on another computer by file sharing.
You have some alternatives:
When on the same computer:
When it's a shared file:
Attempt to rename the file. (Normally it works on Windows Server, in OS clients I can not confirm this)
Stop the windows Server
service, which stops sharing, deletes the file, and then starts the service again.