How to force delete a file which is open in explorer.exe?


  1. 7o9
    Posts : 1
    Win7 Enterprise 64bit
       #1

    How to force delete a file which is open in explorer.exe?


    While I was emptying my Temp folder, I noticed there's this .txt file with size of 0KB. Didn't see it a week ago so it must've gotten on my PC recently, not entirely sure how exactly though. I got concerned when I tried deleting it (with admin rights even) but got an error the action cannot be performed because the file is open in explorer.exe. Not sure why this happens because I haven't installed anything that should be starting at boot. I've also tried deleting it by terminating explorer.exe in Task manager and then removing the file through command prompt, but that didn't work - the file is still there and all that changes is that I don't get an error message upon my attempt to delete it. I also tried deleting it in Safe Mode but the file just doesn't go.



    My antivirus doesn't find anything harmful about this file though, but I wanna be sure. Could this innocent-looking text file be part of something harmful and how could I force delete it?
      My Computer


  2. Posts : 6,021
    Win 7 HP SP1 64-bit Vista HB SP2 32-bit Linux Mint 18.3
       #2

    Hi 7o9, welcome to Seven Forums,

    Have you looked to see if the file is running in Processes or Services?
    What do the file properties of the file say?

    I hope this helps!
      My Computer


  3. Posts : 2,468
    Windows 7 Ultimate x64
       #3

    If it's a temp file, there is no reason to worry, specially about an empty one. Many programs keep creating all sort of temp files, and sometimes they "forget" to delete them. Since the file occupies no space at all, there is no gain from deleting it.

    But if you still want to find out, use Process Explorer to look what process has opened it, then you can terminate it and delete.
    Note that if the file happens to be necesary for something, it's likely to get recreated shortly afterwards.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 15:33.
Find Us