How to Delete a File in Use by Another Program
Whatsapp Pinterest
Advertisement

Windows File Explorer claims the file you’re trying to delete is open in another program or the system? When you can’t open, edit, or delete a file, it’s either still running in the background or didn’t close properly.

Fortunately, you can force close, rename, move, or delete a file that is in use. Here’s how!

How to Overcome the “File in Use” Error

If you want to skip the manual solutions, scroll down to the section where we list tools that can help you unlock and delete a file in use.

Windows file in use in other program or system.

1. Close the Program

Let’s start with the obvious. Did you just open the file and not close it? If the file is closed, but the program is still running, close it too, then try again.

2. Reboot your computer

While rebooting is inconvenient, it requires zero skills or fiddling with stuff like the Task Manager or third party tools. Rebooting also clears your RAM and possibly fixes other nuisances in one go. So try this if you can’t be bothered to look into the cause.

Reboot Windows computer.

If you have already tried rebooting and it didn’t help, skip to the next option.

3. End the Application via the Task Manager

The reason rebooting helps is because the system will start from scratch and—among other things—all processes currently running in the Task Manager will be closed. Instead of rebooting, you can also try to manually end the process or application How to Force Close a Program Without Task Manager How to Force Close a Program Without Task Manager Wondering how to force close a frozen program on Windows? Here are several ways to force-close apps without the Task Manager. Read More that holds your file hostage. This is the most successful method to fix the “file is open in another program” error.

Click Ctrl + Shift + ESC to open the Task Manager. Alternatively, you can right-click the Taskbar or click Ctrl + Alt + Del anywhere in Windows and select Task Manager. If you see the compact Windows 1o version, click More details and make sure you’re in the Processes tab. Now browse for the application that you used to open the “file in use”. For example, if you were viewing a document, look for Word.

Windows 10 Task Manager

Once you find the process, select it and click End task in the bottom right. This will close all instances of the program. If you cannot seem to find the process, have you tried rebooting, yet?

4. Change File Explorer Process Settings

By default, File Explorer launches all its windows in a single process (explorer.exe). It could be, however, that your settings force File Explorer to launch separate processes, which could cause a conflict between different processes.

Press Windows + E to open File Explorer. Go to View > Options > Change folder and search options.

Change folder and search options in Windows File Explorer.

In the Folder Options window, switch to the View tab and find the Launch folder windows in a separate process option. Make sure it’s not checked. Click Apply to save any changes.

How to Delete a File in Use by Another Program Windows Folder Options

If the option was unchecked in the first place, you could try if checking it solves your issue.

5. Disable the File Explorer Preview Pane

Previews in the File Explorer can cause conflicts like the “file is open in another program” error.

Press Windows + E, switch to the View tab, and press Alt + P to close the preview pane. The screenshot below shows an open preview pane on the right.

Close Windows File Explorer preview pane.

After closing the preview pane, try the operation again and see whether the “file in use” error has disappeared.

6. Force Delete the File in Use via the Command  Prompt

You can bypass the File Explorer and force delete the file using the command prompt.

First, we need to track down the file path directory in File Explorer. Press Windows + E to open file explorer, locate the affected file, and copy the file path.

Find file path in Windows File Explorer.

Now press Windows + S, search for Command Prompt, right-click the respective result, and select Run as administrator. To navigate to the file directory of your file in use, enter cd [directory path you copied] and hit Enter.

Navigate to file path in Windows Command Prompt.

Before we can proceed and force delete the file in use, we have to temporarily kill the File Explorer process. This will cause your Taskbar, wallpaper, and open folders to disappear. But don’t worry, you can restart File Explorer and we’ll show you how below.

To close File Explorer, press Ctrl + Shift + ESC, find Windows Explorer, right-click the process, and select End task.

End Windows File Explorer task in Task Manager.

Return to the Command Prompt. If you lost the window, press Alt + Tab to jump to it.

Enter this command to delete the file, replacing everything between the quotes with your actual file name: del "File in Use.doc"

Delete file in Windows command prompt.

To restart the File Manager, open the Task Manager (Ctrl + Shift + ESC), click File > Run new task, enter explorer.exe, and click OK. This should restore your desktop to its usual appearance.

Unlock the File in Use With a Tool

Sometimes, the file in use remains locked, even though it shouldn’t be. If trying to delete it through the Command Prompt didn’t work or if that task is too daunting, use one of these tools.

1. Microsoft Process Explorer

Process Explorer is a more powerful File Explorer. It doesn’t just list all running processes, it can also show you which process took your file hostage. Simply open the Process Explorer Search via Find > Find Handle or DLL (or press Ctrl + F), enter the file name, and wait for the list of processes accessing your file.

Process Explorer Search

You can’t close the process from the search window, but you can use Process Explorer or Windows Task Manager to close the offending application.

2. Unlocker

Unlocker used to add itself to the Windows context menu, meaning you could right-click the file in use and unlock it via the context menu.

In Windows 10, launch Unlocker, browse for the file, select the file, and click OK. Unlocker will look and (if found) remove locking handles. Even if it does not find a handle, you can use Unlocker to Delete, Rename, or Move the file.

Delete, Rename, Move file in use with Unlocker.

Should the file still be in use, you can let Unlocker perform the action upon your next reboot.

Unlocker Error

3. LockHunter

LockHunter will add itself to the Windows context menu. Once installed, just right-click the locked file and select What is locking this file? This should bring up a window showing all processes using the file. You can now select to Unlock, Delete (at next system restart), or Unlock & Rename the file. In our case, we couldn’t unlock the file, but deleting it at the next system restart did work.

Delete File in Use with LockHunter.

Another third-party tool, FilExile, failed to delete our file in use, even though it reported success. However, if your file path is too long, you might still want to give this tool a try.

File Still in Use? Boot Into Safe Mode

If the above didn’t work or if you’re not interested in installing software, there is one last thing you can try: boot into Windows Safe Mode How to Boot Into Windows 10 Safe Mode How to Boot Into Windows 10 Safe Mode Safe Mode is an inbuilt troubleshooting feature that allows you to fix issues at the root, without non-essential applications interfering. You can access Safe Mode in various ways, even if Windows 10 no longer boots. Read More . The file you’re trying to delete may automatically be loaded by another application. Unlockers should still work if that’s the case, but if malware is involved or if you don’t want to deal with third-party tools, this is an alternative route you can take.

In Windows 10, press Windows + I, navigate to Update & Security > Recovery and under Advanced startup select Restart now. From the next screen, select Troubleshoot > Advanced Options > Startup Settings > Restart. When your computer reboots, you’ll see the Startup Settings screen, from where you can choose Safe Mode.

Once you’re in Safe Mode, navigate to the file in question and try your luck once more.

More Windows File Explorer Tricks to Know About

We showed you a few ways to unlock a file open in another program or in use by the system. Hopefully, one of them worked. Two methods involved the Windows File Explorer.

Did you know about these Windows File Explorer features 10 Little Known Features of Windows File Explorer 10 Little Known Features of Windows File Explorer Don’t let Windows File Explorer fool you with its plain looks. It’s capable of many more actions and tweaks than it lets on! Let us show you a bunch of them. Read More :

Image Credit: Jane0606/Shutterstock

Explore more about: File Explorer, File Management, Troubleshooting, Windows Tips.

Enjoyed this article? Stay informed by joining our newsletter!

Enter your Email

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. David
    February 23, 2019 at 8:24 pm

    Found the problem!

    On my PC at least, it was definitely Adobe Reader (when it is the default reader for PDF).
    When I made Foxit Reader my default application for PDF's, the problem went away.
    When I made Acrobat Reader my default reader, the problem came back. Could not delete PDF's (unless I used various workarounds).

    ====

    Solution:
    Open Reader
    Go to View >> Preferences >> Security (Enhanced).
    Unclick "Enabled Enhanced Security"
    Click OK
    =====

    You can now delete PDF's in File Explorer when the Preview pane is open.

  2. Luis
    January 18, 2019 at 1:06 am

    Thanks. Workes when I stopped the service via task manager. Just like that. Saved me a headache.

  3. Jude
    October 16, 2018 at 8:21 am

    Thanks for this article.
    So helpful.

  4. PATIENCE
    April 20, 2018 at 7:13 am

    Thank i had tried all other options just driving me crazy. This was the quickest and effective.
    Thanks

  5. Mr Smith
    April 1, 2018 at 8:11 pm

    This is the best, most comprehensive solution suggesting I've seen for this issue. I used Task Manager and it worked.

    • Tina
      April 12, 2018 at 1:02 am

      Thank you for the feedback and glad the simple file deletion solution worked for you.

  6. Johan
    August 4, 2017 at 11:42 pm

    It works when I end the process with the task manager.
    thank you!!

    • Tina Sieber
      August 5, 2017 at 5:46 pm

      Glad one of the tips worked and thank you for the feedback, Johan.

  7. Alauddin
    April 10, 2017 at 8:30 am

    The Choice of Unlocker is awesome. this one works for me!!!!!
    I was trying to remove folder colorizer but failed.
    removed from app data, registry key, progaram date and succeeded
    buttttt unable to delete one file folderclorshlext.dll from installation folder.

    Thanks !!!!!!! UNLOCKER worked for me

    • Tina Sieber
      April 10, 2017 at 5:59 pm

      Glad you found Unlocker through us, Alauddin! And thank you heaps for the feedback, very much appreciated.

  8. Melissa
    April 1, 2017 at 8:42 pm

    Thank-you! I tried for 4 hours to do this on my own, and accomplished it in 5 minutes with your article. Happy Dance!

    • Tina Sieber
      April 2, 2017 at 8:57 am

      Thank you so much for the feedback, Melissa! Glad I could help you a little with this article.

  9. Aaditya Singhania
    February 17, 2017 at 4:37 am

    If you want to copy the data and facing this error which says "file in use". This is a common problem which occurs during cut, copy, paste and deletion of files. Now there’s a solution that copies the files you want, in the manner you want, without endless error prompts and user intervention. The solution is called GS RichCopy 360 by GuruSquad. In my experience and opinion no other file copy application does it better and simpler than GS RichCopy 360.

    • Tina Sieber
      February 20, 2017 at 5:21 pm

      Too bad that software is overpriced. 79.99 discounted to 49.99. How about a free solution like LockHunter?

  10. Denise
    December 26, 2016 at 6:45 pm

    TASK MANAGER WORKED FOR ME. Thanks!

    • Tina Sieber
      December 27, 2016 at 10:31 am

      Thank you for the feedback, Denise!

  11. raisa222
    October 20, 2016 at 12:09 pm

    Long path error is a very common problem in Windows users face. Try using Long Path Tool if your computer is giving errors like, “Path too long”, “Path too long – aborting (error code 80/1)”, 0x80010135 Path too long”, “Error cannot delete file: cannot read from source file or disk” or “File cannot be copied”. You can use Long Path Tool to resolve these problems. Get support of this product by subscribing it online.

    • Tina Sieber
      October 23, 2016 at 10:39 am

      Thanks for the input, Raisa.

      WOT marks the Long Path Tool website as not trustworthy. Comments indicate that the site has been spamming forums and the tool has been spreading malware. Would you like to comment on that?

      • raisa222
        October 24, 2016 at 7:50 am

        Well Tina, I honestly don't know about that but I have been using this software for a long time. It works really well for me.

  12. webb123
    August 8, 2016 at 2:32 pm

    Use "Long path tool" to solve the error. It helps to delete the long file, rename the long file, etc.....

    • Tina Sieber
      August 8, 2016 at 9:18 pm

      This tool appears to be a scam that contains malware. It's also known as a forum spammer. AVOID!

  13. abhiram
    August 3, 2016 at 12:41 pm

    yes it worked thanks

    • Tina Sieber
      August 4, 2016 at 7:05 am

      Thank you for the feedback, Abhiram!

  14. Elizabeth Croney
    May 26, 2016 at 1:44 am

    Thank You!!! The task manager was exactly what I needed:) Now if only I could commit that keyboard shortcut to memory:)

    • Tina Sieber
      May 26, 2016 at 8:14 am

      You mean CTRL + SHIFT + ESC? How about this to memorize it: The Task Manager allows you to control your sh*t and escape. :)

      • Elizabeth Croney
        May 27, 2016 at 2:06 pm

        I love it!!!! Thank you!!!:) That will work just fine:)

  15. Kevin
    February 1, 2016 at 8:18 pm

    I've found in Windows 10 Explorer, closing the Preview pane works most of the time.

    • brudloff
      April 13, 2016 at 4:08 pm

      Thank you, thank you Kevin! So simple and so easy AND it worked!!

    • vq
      May 13, 2016 at 3:55 am

      I closed the preview pane and I can now delete files. Thank You!

  16. Court
    January 26, 2016 at 1:37 am

    THANK YOU! Fixed (Y)

  17. Anonymous
    August 13, 2015 at 3:54 am

    Thanks. Displaying ALL processes (not just User) allowed me to locate and end the problem app; after that a successful uninstall completed this task. Also, ctl-shft-esc...who knew? Nice.

  18. Anonymous
    July 4, 2015 at 5:48 pm

    hello friends,use long path tool ,its awesome

  19. Anonymous
    June 8, 2015 at 8:57 am

    Thanks for the write up team, Unlocker worked for me, Saved me from pulling my hair out haha

  20. zxz zxw
    May 26, 2015 at 7:02 am

    There are much simpler ways overide windows privilages and delete any and all files in use. The methods provided here are a waste of people's time! MAKE USE OF THAT info before you post such crap! I'm not providing the info on how to do this because I am pissed off at how stupid so many people are in the Tech World. UPDATE THIS PAGE with the methods of bypassing windows bullshit to delete files! OR I guess be a miserable little lemming troll like the rest of the vomitus vile and wretched unsightly disgusting parasitic piece's of satans shitty ass in the tech world!

    • zxz zxw
      May 26, 2015 at 7:09 am

      angrily written.

    • Power
      November 26, 2015 at 8:46 am

      So your idea of helping is complaining, not directly saying how to do it for the people coming here, and maybe being diplomatic enough for him to take you seriously? Good job.

  21. John Paul Erazo
    May 18, 2015 at 9:27 am

    thank you very much. this helped me a lot, i finally get rid of the file that causes to pop an ads on my browser and i cant really see what i'm browsing. the Ctrl+Shift+Esc the task manager menu is the one i use

  22. Techjunkie
    May 8, 2015 at 8:46 pm

    This information is FREE!!!! I see some people complaining in an extremely rude manner and it is uncalled for. Reading some of these comments, one would think that these aholes payed $ for these tips. Hey a-holes, don't you remember your mother's words of advice "if you don't have anything nice to say, don't say anything" ? Grow up children you didn't pay for this helpful information.
    Helped me. Thank you Tina for putting in your valuable time even if other people are ungrateful.

  23. Lithakazi
    April 23, 2015 at 12:28 pm

    I found the artitle helpful and informative

  24. Carolyn
    April 9, 2015 at 11:41 pm

    This works perfectly and was very useful indeed. I appreciate this very much. Thank you.

  25. Joseph Dunn
    April 8, 2015 at 7:07 pm

    DON'T YOU DARE TELL PEOPLE TO USE THE F8 METHOD THERE ARE SERIOUS CONSEQUENCES IN DOING THIS. THE ONLY METHOD I USED TO UNLATCH ANY PROGRAM IS RESTARTING WINDOWS-THIS IS THE ONLY WAY. I TRIED GOING TO THE COMMAND PROMPT AND ENTERING
    CD ETC ETC(I PUT THE URL OF THE FILE'S DIRECTORY HERE) THEN DID
    RMDIR ETC ETC METHOD MANY HAVE RECOMMENDED BUT THIS TOO DOESN'T WORK. TIME FOR ALL TO GO TO THE DRAWING BOARD.

  26. juliaop
    February 13, 2015 at 6:39 am

    i'm using Long path Tool For everything like this.

  27. Lianna
    January 14, 2015 at 5:42 am

    for me it says "The action can't be completed because the file is open in CANT BE DELETED ;("

    and none of these things work for me :(

  28. Hamzah
    January 7, 2015 at 2:51 pm

    for the name of god
    THANK YOU SOO MUCH

  29. jack
    March 28, 2014 at 5:27 pm

    u can use file schredder which is freeware, and it will secure delete the file even if its in use!

  30. Todd
    March 25, 2014 at 1:29 am

    Often a file gets locked by Windows Explorer when it's attempting to load meta-data regarding an .avi file that may not be properly created either missing the data or having a wrong extension meaning it doesn't have the corresponding meta-data. Terminating Windows Explorer through the task manager and then going to a System Prompt usually cures the problem.

  31. Navanski
    March 24, 2014 at 11:46 pm

    Linux Live CD and you can rummage around and delete what you want.

    • Bill_Board
      March 27, 2014 at 7:08 pm

      I 2nd that especially for those pesky "access denied" files even tho you are Admin...

  32. np
    March 24, 2014 at 11:01 pm

    You can also use Process Explorer from Microsoft:
    http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
    Right-click PE icon-> Run As Administrator

    Find -> Find Handle or DLL
    Will then show the process that has it opened in the main window. Wait for a bit even after the first results appear as it still searches.
    If the Type is "File" you can right-click and close the handle

  33. x64.bits
    March 24, 2014 at 10:00 pm

    i use lock Hunter (http://lockhunter.com) since Unlocker doesn't work in Windows 7 (64 bit)

  34. AJ
    March 24, 2014 at 7:05 pm

    Thanks for the article Tina.
    I have been using Unlocker for many years now. It has always worked for me bang-on 98 times out of 100. The other 2 times it offers to delete the file at next reboot. And it does so, at the next reboot.
    It is one of those tools that I wish Microsoft builds right into the File Explorer.
    The other being:
    A bulk file renamer like File Renamer Turbo.
    A versatile image viewer/ browser/editor/converter like FastStone Image Viewer
    A directory printing application like Karens Directory Printer

  35. RK
    March 24, 2014 at 6:15 pm

    Ha, as always in windows, reboot is the cure for a whole host of PC problems lol.

  36. Emily
    March 24, 2014 at 5:38 pm

    pmshah, thanks for the tip.

  37. pmshah
    March 24, 2014 at 4:45 pm

    Unlocker is the best tool. It can also forcibly close the related application. If this fails your best bet is to live boot XP or Win 7 and delete the files.

  38. Emily
    March 24, 2014 at 3:18 pm

    Helpful information, thanks. Is there a similar way to address the problem of thumb drives that can't be 'removed safely' because they are 'in use' an hour after their work has been finished ?

    • pmshah
      March 24, 2014 at 4:48 pm

      There is a third party "USBSafelyRemove.exe" utility by Crystal Rich on the net. It is the only one that works every time.

  39. Sunpreet Rathor
    March 24, 2014 at 3:22 am

    You could also do the following:
    1. Start Task Manager
    2. Kill explorer.exe process tree
    3. Start cmd as the only process
    4. Type the command del filename and press Enter

    Worked for me most of the time. After that start explorer.exe as a new process.

  40. Ran L
    March 22, 2014 at 3:06 pm

    You can end explorer.exe, then start it again within Task Manager.

  41. J Lingruen
    March 22, 2014 at 9:10 am

    This is the only way I can get through to you. How the hell did you get my name. I am royally pissed off and appalled . I have not have an active computer since 2009. I see my name with nasty comments dated 2011. I just got my computer 2014. What is this crap about Mr. Pantyhose, 7s need to check herself, crystal says hi and self abuse. Are you kidding me.???? This is the only way I can get through to you. Better find out who the scum is who is using my name and have them checked out!!!! I will NEVER join another chat group or download any such crap anymore. I better see my name deleted because I'm not that disgusting person.

    • Tina S
      March 24, 2014 at 10:30 pm

      Hello J,

      I'm not sure what you are referring to. Could it be that one of the 7 billion other people on this planet has your name and is using it on the Internet? Tough luck.

      If you point me to the offending comment/s, however, I may be able to do something about that. You'll find my email address on our About page.

  42. Phil E.
    March 22, 2014 at 5:03 am

    I ran into this problem because I had the "preview pane" open in Windows Explorer. Something to check before you go all task manager on it.

  43. Anthony
    March 22, 2014 at 4:58 am

    It would seem the fastest method is just restarting and eliminating the file lock. I've heard it called a Schema Lock, but I don't know if that's right.

  44. TokyoDesu
    March 22, 2014 at 12:24 am

    i have 2 folders without name and don't delete DX is bad xD

  45. Xantes
    March 21, 2014 at 8:07 pm

    There are zillion other third party software... but I ain't gonna tell you anything about them since your article was written for no other reason but to increase your site's rating! It didn't show 5 INDEED ways to delete files while they're in use!

    • Ed
      March 21, 2014 at 8:36 pm

      I found the article informative, but have to agree that the article is really about resolving the "This action can't be completed because the file is open in another program" warning rather than 5 individual methods for deleting an in-use file.

      Thank you for the information Tina.

      Ed

    • Mike
      January 13, 2015 at 3:51 am

      I agree with you completely!!!!!! this was worthless!!!