Why Cant I Delete, Edit, or Rename a File That Is in Use?

To use File Locksmith,download and install Microsoft PowerToys.

Once installed, open PowerToys from the Start menu and tap the “Enable File Locksmith” toggle button.

The Windows dialog warning that a file is in use.

The File LockSmith PowerToy will open and show a list of programs that are using the file.

you might also end the program that is using the file from this screen.

confirm it’s safe to end a program before doing so using any method on this page.

The PowerToys settings screen showing the toggle to enable File Locksmith.

It’s worth having a goodbackup routineto protect against file loss.

Finally, bang out the name of the locked file in the search box, highlighted in red below.

You will then see a list of the processes using the file.

The location of the ‘Show more options’ button in the context menu.

Afterdownloading handle, navigate to its directory inPowershell.

you’re free to alsokill the process from your script.

The location of the “Unlock with File Locksmith” option in the context menu.

The File Locksmith screen including the ‘End task’ button.

The location of the ‘Associated Handles’ section in the Resource Monitor.

The location of the search box and name of the process using a file in the Windows Resource Monitor.

Windows Powershell showing the result of using handle.exe to see what program is using a file.