You may have encountered the "File in use" errors when deleting files/folders, especially when clearing out the Temp folder. To successfully delete the temporary files which are in use, you need to determine the process name which has locked the file, and then close the corresponding application first. In Windows 7, the File In Use dialog has improved, as it displays the name of the process which has locked the file.
Here is how the File In Use dialogs appear in various Windows Operating Systems
Windows XP

Windows Vista

Windows 7

Fig 3: File In Use dialog in Windows 7, showing the process name / handle (Internet Explorer)
Related Posts
- How to Use Resource Monitor to Find Which Process Has Locked a Given File in Windows 7
- Why There Are Two Instances of Sidebar.exe Running
- Configure Task Manager to Display Full Path of Running Processes
- How to Use Process Monitor to Track Events and Generate a Log File
- Script to Retrieve Last Logon Date and Time for Local User Accounts in Windows
If you enjoyed this post, make sure you subscribe to our RSS feed! We feature Tips, Troubleshooting information, Scripts and Utilities for Microsoft Windows Operating Systems!
Prefer an E-mail subscription?





Great post! These are necessary things to keep in mind, it’s often easy to forget regarding the simple things once you get consumed by a project.
Hi,
looks like Windows 7 does it itself when you open file with the WIN32 API.
André
I don’t understand why IE (in Vista) does not implement the interface but IE in W7 does? Those two examples (screenshots 2 & 3) involve IE only. To better explain this, see this screenshot:
http://www.winhelponline.com/blog/wp-content/uploads/temp/w7-fiu.png
http://www.winhelponline.com/blog/wp-content/uploads/temp/vista-fiu.png
http://www.winhelponline.com/blog/wp-content/uploads/temp/vista-fiu-2.png
In both the occasions, the executable file (clsidviewer.exe) is the same. I’m the author of that proggie and I haven’t implemented the IFileInUse interface.
Windows Explorer calls it too in Vista, but the application that opens the file must implement the inferface. Here is an example of an opened Word File which I try to delete under Vista Sp1.
http://www.pic-upload.de/07.02.09/bben2p.png
@Andre: Thanks! Does that mean that Windows Explorer in Vista does not call/use this function, but Windows 7 Explorer does?
Hi,
the Information about the application is also displayed under Vista if the Application implements the IFileIsInUse Inferface ;) This is not a new feature from Windows 7
André