How do I remove a file from open in system?

Removing a file that is currently open or in use in Windows can be tricky, but there are a few methods you can try to force close or delete the file. Here are some quick answers to common questions about removing in-use files in Windows:

Can I delete a file that is currently open?

No, you cannot directly delete a file while it is open in a program. Windows protects open files from being deleted or modified to prevent errors or data corruption. You must first close the program using the file.

How do I force close a program using a file in Windows?

If you need to delete a file that is currently open, first close the program using the file. You can force close (quit) an application in several ways:

  • Open Task Manager by pressing Ctrl+Shift+Esc and select the program. Click End task.
  • Right-click the program icon on the taskbar and select Close window.
  • Use the keyboard shortcut Alt+F4 to close the program window.

Closing the program this way will allow any open files to close and be released.

What are some other ways to delete a file in use?

If force closing the program does not work, here are a few other things you can try:

  • Restart the computer – A restart will close all open programs and allow you to delete any files.
  • Use Unlocker – This free utility can delete files even if they are locked or in use. It installs an option in the right-click menu.
  • Change permissions – You may be able to take ownership of the file and change its permissions to delete it.
  • Boot into Safe Mode – Booting into Safe Mode loads a minimal Windows environment and prevents most programs from starting.

How can I prevent files being locked in the future?

To avoid the issue of not being able to delete files because they are in use, you can:

  • Close programs properly when you are finished using files.
  • Avoid opening files directly from removable drives.
  • Disable Indexing on certain folders prone to locked files.
  • Add the Unlocker utility to your right-click menu for quick access.

How does Windows lock open files?

Windows locks files that are currently open to prevent data corruption or problems. When a program opens a file, it places a lock on the file which prevents other programs or users from modifying or deleting it until closed. This ensures integrity of the data while in use.

Some reasons Windows may lock a file include:

  • The file is opened in a program like a Word document in Microsoft Word.
  • An Explorer window has the file or folder open.
  • The file is being used by a background process.
  • The file is stored on a shared network location.

Once the program using the file is closed, the lock will be released and you can modify or delete the file.

What types of files get locked in Windows?

Any type of file can potentially be locked if opened. Some common examples include:

  • Document files like Word, Excel, PowerPoint
  • Media files like photos, videos, music files
  • Temporary files and caches
  • Program and system files
  • Browser files
  • Downloaded files from internet
  • ZIP and RAR archives

Generally you will only see locks on files that are opened via user programs. Critical system files are usually not locked so they can be replaced during updates.

What error do you get when deleting a locked file?

If you try to delete a locked file, you will typically get one of these errors:

  • “File in Use” or “This file is open in another program”
  • “Access is Denied”
  • “Cannot delete file: The file or directory is corrupted and unreadable”
  • “Folder Access Denied”
  • “Cannot read from the source file or disk”

These errors indicate the file is locked and cannot be deleted or changed until closed. The exact error message depends on what program has the file open and is preventing access.

Can I delete a file with Open or Lock icon?

If you see an open lock icon overlay on a file icon, this indicates the file is locked and in use. The open lock icon typically means:

  • The file is open in a program
  • An Explorer or search window has the file open
  • Antivirus or backup software is scanning the file

You cannot delete the file until the open lock icon disappears, indicating any programs have closed it. Closing those programs or restarting your PC should eliminate the lock.


To summarize, you cannot directly delete a file in Windows while it is open in a program. To remove locked or in use files:

  1. Close any programs that have the file open.
  2. Use Task Manager to force quit programs if needed.
  3. Restart your computer to close all open files.
  4. Use utilities like Unlocker to remove locked files.
  5. Change permissions or boot in Safe Mode if needed.

Following these steps should allow you to remove any locked files. Avoiding opening files directly from external drives can help prevent file locks in the future.

Error Message Cause Solution
“File in Use” or “This file is open in another program” The file is open in a program Close the program using the file
“Access is Denied” You lack permissions for the file Gain permissions or take ownership
“Cannot delete file: The file or directory is corrupted and unreadable” The file is damaged Restart computer and run CHKDSK
“Folder Access Denied” The folder is in use or locked Close any open folder windows
“Cannot read from the source file or disk” Drive errors or corruption Run CHKDSK and restart PC

This table summarizes some common error messages when trying to delete locked files, their causes, and solutions to resolve the issue.

Further Steps to Avoid File Locks

In addition to the solutions described, here are some other steps you can take to prevent file locks:

  • Disable indexing on folders prone to locked files
  • Install Unlocker to always have right-click delete option
  • Close programs properly when finishing with files
  • Don’t open files directly from external drives
  • Restart computer regularly to clear locks

Following good file usage and maintenance practices can reduce the number of in-use file locks.

Using Unlocker Software

Unlocker is a free utility that can force delete locked files when standard methods fail:

  • Download and install Unlocker
  • Right-click a locked file and choose Unlocker option
  • Select Unlock All to remove locks and delete
  • Can also unlock folders, devices, and processes
  • Useful for advanced management of file locks

Unlocker provides an easy way to gain control over stuck locked files in Windows. It integrates with Explorer right-click menus for quick access.

Preventing Locks on External Drives

Opening files directly from external drives like USB sticks can sometimes cause lock issues. To avoid:

  • Copy files from external drive to local PC first
  • Open and edit copies of files on local drive
  • When done, delete originals and copy files back
  • Avoids directly opening from external drive

This technique prevents the “USB stick in use” locking issues. The slight inconvenience is worth it to avoid stuck file locks.

How can I tell if a file or folder is locked in Windows?

Here are some ways to identify if a file or folder is locked in Windows:

  • Try deleting the file and see if you get an error message about the file being open or in use.
  • Check the file or folder icon for an overlay image of an open lock, indicating it is locked.
  • See if the file is open in a program like Word or Excel by checking the taskbar or program switcher.
  • Open Task Manager and see if any processes are using the file under the Details or Processes tabs.
  • Use the Handle and Process Explorer utilities from Sysinternals to see which processes have open handles on the file.
  • Try renaming the file. If you get an error about the file being open or used by another process, it is likely locked.
  • See if you are able to modify or write to the file by opening it in a program or editing it.

If any of those indicate a file lock, you will need to close the open program, restart the PC, or use a lock removal tool like Unlocker before deleting the file. The same checks can help identify if an entire folder is locked as well.


In summary, deleting a file in use or locked by Windows can be tricky but solvable. The key steps are:

  1. Close any programs that are using the file.
  2. Force quit unresponsive programs using Task Manager.
  3. Restart your computer to clear any stuck locks.
  4. Use special utilities like Unlocker if standard methods fail.
  5. Change permissions or boot in Safe Mode for additional options.

Following these troubleshooting steps and using good file management practices can help avoid and resolve in use file errors. Be persistent and eventually you can regain control of locked files in Windows.