WindowsHigh

File in Use Error: Causes and 5 Ways to Fix

The article explains in detail why Windows blocks file access and provides practical ways to release it: from simply ending the program to using Process Explorer. You'll learn to diagnose the problem and prevent it in the future.

Updated at February 16, 2026
10-15 minutes
Medium
FixPedia Team
Применимо к:Windows 10Windows 11Windows Server 2016+

What the "File in Use" Error Means

The "File in Use" error (or its English equivalent "The process cannot access the file because it is being used by another process", error code 32) is a Windows system message that appears when you try to perform an operation on a file (delete, rename, move, change), but the operating system detects that the file currently has an open handle by another active process.

Symptoms:

  • When attempting to delete: The process cannot access the file because it is being used by another process.
  • When attempting to rename/move: similar message.
  • In Command Prompt or PowerShell: The process cannot access the file because it is being used by another process.

Causes

The error occurs because Windows uses an "open handle" model. While a program has an open handle to a file (for reading, writing, or execution), the system does not allow other processes to modify the file's metadata to avoid data corruption. Specific causes:

  1. The file is open in a program. The most common case. You closed the Word window, but the WINWORD.EXE process remained in the background (e.g., in the system tray). Or a log file is open in Notepad++.
  2. The file is used by a background service or process. System services (e.g., SearchIndexer.exe for indexing, backup services, antivirus) may scan or process the file.
  3. Antivirus software. Real-time scanning implementations often lock the file briefly for inspection.
  4. The file is an executable or library (DLL) loaded into memory. If you try to delete an .exe or .dll that is currently being executed or used by another process, the system will prohibit it.
  5. Orphan process. A program crashed, but its process remained in memory and holds the handle.
  6. Network access. If the file is on a network resource, it may be locked by a remote user or process.

Solutions

We recommend following the methods in order of increasing complexity and radicality.

Method 1: Close the program manually (simplest)

Often the solution is obvious.

  1. Recall which program you last worked with this file in (Word, Excel, Photoshop, IDE, media player).
  2. Close this program completely. Not just the window, but the entire process. Check in Task Manager (Ctrl+Shift+Esc) on the "Processes" or "Details" tab to see if the program's process is still there. If so — select it and click "End task".
  3. Retry the file operation.

If you don't know which program holds the file.

  1. Open Task Manager (Ctrl+Shift+Esc).
  2. Go to the "Details" tab (in Windows 10/11).
  3. Sort the "Name" column alphabetically.
  4. Review the process list, looking for those that might be related to your file (by program name or file type). Common culprits: SearchIndexer.exe, AdobeIPCBroker.exe, OneDrive.exe, Dropbox.exe, explorer.exe.
  5. Caution: Ending system processes (explorer.exe, svchost.exe) may cause system instability. Only end processes whose purpose you understand.
  6. Select the suspected process and click "End task".
  7. Try working with the file again.

Method 3: Identify the exact process via PowerShell (precise method)

This method allows you to find the process that specifically holds a handle on your file.

  1. Open PowerShell as Administrator (Win+X → Windows PowerShell (Admin)).
  2. Run the command, replacing C:\путь\к\файлу.txt with the actual path to your file:
    $file = "C:\путь\к\файлу.txt"
    Get-Process | Where-Object { try { $_.Modules.FileName -like "*$file*" } catch { $false } }
    
    What the command does: It iterates through all processes, attempting to get a list of loaded modules (DLLs/EXEs). If a module's name matches your file's path, the process is output.
  3. In the output, you'll see the process name (e.g., notepad). Note its PID (process ID) or name.
  4. End this process either via Task Manager (by name or PID) or in PowerShell:
    Stop-Process -Name "process_name" -Force
    # Or
    Stop-Process -Id 1234 -Force # where 1234 is the PID
    
    The -Force flag ensures termination.

Method 4: Use Process Explorer (most reliable)

Process Explorer from Sysinternals (Microsoft) is an advanced version of Task Manager that shows all handles open by each process.

  1. Download Process Explorer from the official Microsoft website.
  2. Run procexp.exe as Administrator (right-click → "Run as administrator").
  3. Press Ctrl+F (or menu FindFind Handle or DLL...).
  4. In the window that opens, enter your file's name (or part of it) and click "Search".
  5. At the bottom of the window, a list of processes with an open handle to this file will appear.
  6. Double-click a found result. This will highlight the corresponding process in the main Process Explorer window.
  7. Right-click the highlighted process and select Close Handle. Confirm the action.
  8. Close Process Explorer and try the file operation again.

Method 5: System reboot (radical but guaranteed)

If previous methods didn't help or you cannot identify the process (e.g., it's a system process that can't be terminated), rebooting is the simplest way to reset all handles.

  1. Save all data in other open programs.
  2. Reboot the computer (StartRestart).
  3. After the system fully loads, avoid opening programs that might have worked with this file, and immediately try to delete/move it.

Prevention

To minimize the risk of the "file in use" error:

  • Close programs properly. Not just with the close button, but via the "File" → "Exit" menu, especially for heavy applications (IDE, graphic editors).
  • Don't leave files open in background programs. For example, if you edited a log file in Notepad++, close it too.
  • Configure your antivirus. Add the folder with frequently modified files (e.g., your project folder) to the real-time scanning exclusions. Do this with caution and only if you are sure about the file safety.
  • Use "Safe Mode" for critical operations. If you need to clean a folder with system/program files, boot into Safe Mode (hold Shift when clicking "Restart" in the Start menu → "Troubleshoot" → "Advanced options" → "Startup Settings" → "Restart" → select "Safe Mode"). In this mode, minimal drivers and services load.
  • For developers: Ensure your code (in Python, C#, Java, etc.) properly closes file streams (f.close(), using(), try-with-resources). A handle leak in your program is a common cause of locking.

F.A.Q.

Why is the file in use if I closed all programs?
Can I automatically find and close the process locking the file?
Is it dangerous to force-end processes in Task Manager?
Can antivirus block files? How to check?

Hints

Identify which program is holding the file
End the process via Task Manager
Use PowerShell to find the handle
Use the Process Explorer utility
Restart the computer
FixPedia

Free encyclopedia for fixing errors. Step-by-step guides for Windows, Linux, macOS and more.

© 2026 FixPedia. All materials are available for free.

Made with for the community