Can't delete a file or folder
Windows won't let you delete a file or folder
You try to delete a file or folder and Windows tells you it can't because the file's in use.
As far as you can tell, it's not.
What's up with that? And more to the point, how can you make it stop acting up?
Solution
You need to work out what program has the file in use.
Sometimes it's Windows Explorer itself. If you've selected a file in Explorer and its preview is showing in the Preview pane, the file is most likely open. Select a different file, then right-click the file you want to get rid of and choose Delete from the pop-up menu.
Sometimes it's Windows Explorer just thinking the file is open when it's not. Or shouldn't be. If Explorer's behaving like a brat, swat it:
- Press Ctrl + Alt + Delete and choose Task Manager.
- Go to Task Manager's Processes tab
- Select the EXPLORER.EXE process
- Click END PROCESS at the lower right corner of the screen. Don't be upset when your desktop and all the icons on it disappear; this is normal.
- From the menu bar, choose File | New Task and when asked, type EXPLORER.EXE to restart Explorer.
Sometimes, a deeper dive into Windows is called for. You need to find out what program has the un-deletable file open and close the program or at least use the program to close the file. To find out what program has the file locked:
- Press the Windows key or click the Windows Start button.
- In the search textbox, type RESOURCE MONITOR then press Enter
- In Resource Monitor, go to the CPU tab, click the downward pointing arror next to Associated Handles
- Type the name of the problem file or folder into the search box, then press Enter
It's not 100% accurate but with luck, it will point you at the program that's holding your file open and keeping you from removing it.