How to Delete a File in Use by Another Program in Windows 10 (2024)

Windows File Explorer can get things wrong. Maybe you can't delete a file or folder because it appears to be in use elsewhere on 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.

We'll show you how you can force close, rename, move, or delete a file that is in use.

How to Overcome the "File in Use" Error

How to Delete a File in Use by Another Program in Windows 10 (1)

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.

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 the application, then try again.

2. Reboot Your Computer

How to Delete a File in Use by Another Program in Windows 10 (2)

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.

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 your computer helps is that the system will start from scratch. This closes all processes currently running in the Task Manager. Instead of rebooting, you can also try to manually end the process or application that holds your file hostage. This is the most promising method to fix the "file is open in another program" error.

Click Ctrl + Shift + ESC to open the Task Manager. Alternatively, you can press Ctrl + Alt + Del or right-click the Taskbar and select Task Manager. If you're on Windows 11, the Taskbar right-click won't work.

If you see the compact Task Manager version, click More details in the bottom left and make sure you're in the Processes tab.

How to Delete a File in Use by Another Program in Windows 10 (3)

Browse for the application that you used to open the "file in use." For example, if you were viewing a document, look for Microsoft Word.

How to Delete a File in Use by Another Program in Windows 10 (4)

Once you find the process, select it and click End task in the bottom right. This will close all instances of the program.

4. Change File Explorer Process Settings

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

Press the Windows key + E to open File Explorer. In Windows 10, go to View > Options > Change folder and search options.

How to Delete a File in Use by Another Program in Windows 10 (5)

In Windows 11, click the three-dot "See more" icon next to View, then select Options.

How to Delete a File in Use by Another Program in Windows 10 (6)

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 in Windows 10 (7)

If the option was unchecked in the first place, you could try if checking it to see if 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.

In Windows 10, press the Windows key + E, switch to the View tab, and press Alt + P to close the preview pane. In Windows 11, also open File Explorer (Windows key + E), then go to View > Show, and, if you see a checkmark next to Preview pane, click that option to close it.

The screenshot below shows an open preview pane on the right.

How to Delete a File in Use by Another Program in Windows 10 (8)

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 the Windows key + E to open File Explorer, locate the affected file, and copy the file path.

How to Delete a File in Use by Another Program in Windows 10 (9)

Now right-click the Windows Start button and select Command Prompt (Admin) or Windows Terminal (admin). To navigate to the file directory of your file in use, enter cd [directory path you copied] and hit Enter.

How to Delete a File in Use by Another Program in Windows 10 (10)

Before we can proceed to 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 again and get everything back.

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

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.docx" 

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.

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

Microsoft's 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 + Shift + F), enter the file name, and wait for the list of processes accessing your file.

How to Delete a File in Use by Another Program in Windows 10 (11)

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. However, you'll now need to put in a bit more elbow grease to get Unlocker working 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.

How to Delete a File in Use by Another Program in Windows 10 (12)

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

3. LockHunter

Unlike Unlocker, 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.

How to Delete a File in Use by Another Program in Windows 10 (13)

File Still in Use? Boot Into Safe Mode

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. If none of the above methods worked, or if you're not interested in installing software, there is one last thing you can try: boot into Windows Safe Mode.

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, then Safe Mode is your next best bet.

In Windows 10, press the Windows key + I, navigate to Update & Security > Recovery. Then, under Advanced startup, select Restart now. In Windows 11, also open the Settings app (Windows key + I), then head to System > Recovery, and click Restart now, which will launch an advanced startup.

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.

Working Your Way Around File Explorer

It's really annoying when an unwanted file claims to be still in use, and doubly so when you have no idea what's using it. Now you know how to free up a locked file or force your PC to delete it regardless.

If solving this problem was the last straw for you, did you know there are File Explorer alternatives that you can download? For instance, XYplorer is an excellent portable substitute for Microsoft's own offering.

How to Delete a File in Use by Another Program in Windows 10 (2024)

References

Top Articles
UK in shock after one of worst knife attacks on children. Here’s what we know | CNN
Rusia y Occidente realizan el mayor intercambio de prisioneros desde la Guerra Fría con 24 personas liberadas - BBC News Mundo
Cooking Chutney | Ask Nigella.com
Craigslist Motorcycles Jacksonville Florida
Teamexpress Login
Hay day: Top 6 tips, tricks, and cheats to save cash and grow your farm fast!
Mr Tire Rockland Maine
Rainfall Map Oklahoma
4302024447
Help with Choosing Parts
Busty Bruce Lee
24 Hour Walmart Detroit Mi
Sony E 18-200mm F3.5-6.3 OSS LE Review
Wicked Local Plymouth Police Log 2022
Ppm Claims Amynta
Jeffers Funeral Home Obituaries Greeneville Tennessee
C&T Wok Menu - Morrisville, NC Restaurant
European city that's best to visit from the UK by train has amazing beer
Teekay Vop
Avatar: The Way Of Water Showtimes Near Maya Pittsburg Cinemas
Bj타리
Ticket To Paradise Showtimes Near Cinemark Mall Del Norte
R/Airforcerecruits
What are the 7 Types of Communication with Examples
134 Paige St. Owego Ny
What Is The Lineup For Nascar Race Today
O'reilly Auto Parts Ozark Distribution Center Stockton Photos
Most popular Indian web series of 2022 (so far) as per IMDb: Rocket Boys, Panchayat, Mai in top 10
Envy Nails Snoqualmie
Where Do They Sell Menudo Near Me
Daily Journal Obituary Kankakee
Etowah County Sheriff Dept
The 50 Best Albums of 2023
Nobodyhome.tv Reddit
Stanford Medicine scientists pinpoint COVID-19 virus’s entry and exit ports inside our noses
Stafford Rotoworld
Google Chrome-webbrowser
Cranston Sewer Tax
Thelemagick Library - The New Comment to Liber AL vel Legis
Craigslist Com Panama City Fl
2132815089
Miami Vice turns 40: A look back at the iconic series
Craigslist Malone New York
Mathews Vertix Mod Chart
Yakini Q Sj Photos
UT Announces Physician Assistant Medicine Program
Breaking down the Stafford trade
City Of Irving Tx Jail In-Custody List
Okta Login Nordstrom
Treatise On Jewelcrafting
Festival Gas Rewards Log In
San Pedro Sula To Miami Google Flights
Latest Posts
Article information

Author: Allyn Kozey

Last Updated:

Views: 6005

Rating: 4.2 / 5 (63 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Allyn Kozey

Birthday: 1993-12-21

Address: Suite 454 40343 Larson Union, Port Melia, TX 16164

Phone: +2456904400762

Job: Investor Administrator

Hobby: Sketching, Puzzles, Pet, Mountaineering, Skydiving, Dowsing, Sports

Introduction: My name is Allyn Kozey, I am a outstanding, colorful, adventurous, encouraging, zealous, tender, helpful person who loves writing and wants to share my knowledge and understanding with you.