Deleting a file is a simple process as long as a program is not currently using it. You cannot delete a file if a program currently uses it. You will need to exit the program or process that is using the file and then delete the file to complete the deletion process.

Although closing the program will work in most cases, it may not work if a critical windows process uses the file you want to delete. Besides this, you are also bound to get this error message when this program runs in the background. In that case, you may need to follow specific solutions to delete these files.

How to Delete a File That is Open in Another Program?

When you get this error message while deleting a file, first close all the applications that are running. Also, ensure that you exit any unnecessary application from the tray icon. If you have a lot of applications/programs running, it may be hard to determine which one is using the file you want to delete.

Resmon

Check Resource Monitor

You need to know the application/process that is using the file. however, this is not possible without Resource Monitor. Resource Monitor allows you to know the process that is currently using the file that you want to delete.

Once you figure this out, stop this process/application anddelete the file. To find the process that is using the file using Resource monitor,

Once you find the process/application you may exit the program using the Task Manager.

resource-monitor-delete-files

Close the program Via Task Manager

Some programs will keep running in the background even when you exit the entire application. Since the application still uses the file in the background, you cannot remove this file. To delete these files, you need to kill the background process via theTask Manager.

If you cannot find the correct application, close any unnecessary application/process running in the background.

Close the Process using Process Explorer

Sometimes, you may be unable to determine which process is using the file. In this case, we recommend that you use an application developed by Microsoft called Process Explorer. you may use this application to determine the process that is using a specific file.

end-process-task-manager-file-not-deleting

Delete from Command Prompt

RunningCommand Promptas Administrator gives you admin privileges. This means that you will have access to features that are normally restricted. And you may run commands that are not available in normal user mode.

download-process-explorer

run-procext-exe-file

kill-process-using-process-explorer

copy-file-location-file-not-deleting

delete-file-using-command-prompt-as-admin