Master tricks Win7 can not delete files

  
files can not be deleted, such a situation we often encounter. 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".
The following is a simulation of the situation in which the reproduction file 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 pops up, 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 the "Security" dialog box in the "Windows Task Manager" console window that opens. And click on the <quo;Resource Monitor> button in the tab to go to 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. Search for a while, as you can see the search 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, 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.
The above steps are a bit cumbersome, so how can I quickly call the resource monitor? In the process list, you can see that the process name is perfmon.exe, but this is the 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 is fine, so create a shortcut to point to "C:\\Windows\\System32\\perfmon.exe /res”, use this shortcut to achieve a quick call.

Copyright © Windows knowledge All Rights Reserved