Can not delete files, use Windows7 to easily solve

  

Recently found a problem when visiting the forum, I feel that this problem is a problem that win7 users often encounter, just turn this question here to share with everyone. : Sometimes, when I want to delete a file or folder, I usually run into "The operation cannot be completed, the file is running in another program"; I can't delete it, I quit the program, I still can't delete it. What should I do?

Files cannot be deleted. We often encounter such situations. This is because a certain "behind-the-scenes" process is calling the file, and only the end of the process can be deleted. So how do you locate the process? Usually, we need to use third-party tools such as “Ice Edge”. However, it's easy to do it with Windows 7 in its "Resource Monitor".

Below we simulate the reproduction of a file that cannot be deleted. Create a folder called test on the D drive, then run a command prompt (cmd) and locate the command path to the folder directory. At this point, we delete the test folder, you can see the dialog box shown in Figure 1, prompting: the operation can not be completed, the folder or file is opened in another program.

Next we can do this: right click on the Windows 7 taskbar and select the "Start Task Manager" command, click on "Open" in the "Windows Task Manager" console window. ” tab, then click on the <quo;Resource Monitor> button in the tab to enter the <quo;Resource Monitor” console. Click the "CPU” tab in the console to navigate to the tab, then type “test" in the search box to the right of the associated handle'; the system will automatically search for the system associated with the test handle. process.

Wait a moment, you can see that the searched process is cmd.exe (suppressed the above simulation). This shows that it is the cmd.exe process that is calling the test folder, which causes the deletion of the folder to fail. Right-click on the process and select the “End Process” command to pop up a warning dialog box to confirm the cmd.exe process. Finally, delete the test folder and you can see that the folder was successfully deleted. Although the above is a simulated scene, it is exactly the same as the real scene. As long as you flexibly apply such problems, it will not bother you.

There are two other ways to solve it. Let's learn it together.

Method 1: Restart the computer and delete it in safe mode

When restarting the computer, press F8 enters safe mode. In safe mode, the system does not actively run other programs, which is equivalent to an undisturbed environment. In this way, the file will not be occupied by other programs or systems, and the file or program can be deleted directly. (This method is best)

Method 2: Delete in WinPE

Enter WinPE, it is similar to entering safe mode, you can delete it directly.

Copyright © Windows knowledge All Rights Reserved