The Windows Resource Monitor can be used to remove a file that is still in use.
Step 1: Press Win+R.
The Run box is at the bottom- left corner of the screen.
Step 2: Go to the website and type the name of the program.
Step 3: Press enter.
Resource Monitor is an application that this opens.
Step 4: Click on the tabs.
Step 5: Next to the box is the file name.
There is a box with a magnifying glass.This searches for processes that are using the file.If you type the exact file name, multiple processes will appear in the search results, so the only search result is for the file you typed.
Step 6: Click on the process for your file.
Step 7: Click the end process.
There will be a message.
Step 8: To confirm, click end process.
Step 9: The file should be deleted from its location.
You should be able to remove the file easily now that the process has stopped.Press Del to return to the folder where the file is located.