Files cannot be deleted. We often encounter this situation. This is because a "behind-the-scenes" process is calling the file. At this time, only the process can be deleted. So how to locate the process? In general, we need third-party tools such as "ice blade. However, you can easily use its "Resource Monitor" in Windows 7. I generally like the unlock software in the XP system. Since Windows 7 can be done by myself, no external tools are needed.
Next we will simulate the situation where the file cannot be deleted. Create a folder named test on drive D, run the command prompt (CMD), and locate the command path to the folder directory. In this case, we delete the test folder and you will see the pop-up dialog box with the prompt: The operation cannot be completed, and the folder or file is opened in another program.
Next, right-click the Windows 7 taskbar and select the "Start Task Manager" command. In the window that opens the "Windows Task Manager" console, click the "performance" tab, click "Resource Monitor" in the tab to go to the "Resource Monitor" console. Click the "CPU" tab in the console to locate the tab, and enter "test" in the search box on the right of "associated handle ", in this case, the system automatically searches for the system processes associated with the test handle. The search duration is "cmd.exe" (which confirms the simulated scenario above ). This indicates that the cmd.exe process is calling the test folder to delete the folder. Click the button on the right to go to the process. Then, select "submit progress" and send a warning dialog box. After confirmation, you can access the cmd.exe process.
Finally, delete the test folder. You can see that the folder is successfully deleted. Although the above is a simulated scenario, it is actually exactly the same as the actual scenario. As long as you flexibly apply such problems, it will no longer bother you.
The above steps are a little troublesome. How can we quickly call the resource monitor? In the progress, you can see that the progress name is perfmon.exe, but this is a Performance Monitor, and the resource monitor cannot be found in it. Later, considering the problem of command line parameters, a parameter/Res was added. After testing, everything works normally. Therefore, you can create a shortcut pointing to "C: windowssystem32perfmon.exe/Res" and use this shortcut to implement quick calls.