Windows Troubleshooting ยท 2026

File Is Open in Another Program:
How to Fix the File in Use Error

A practical Windows 10 and Windows 11 guide for deleting, renaming, moving, or editing a file when Windows says it is being used by another process.

โŠž Windows 10 โŠž Windows 11 ๐Ÿ”’ Locked File ๐Ÿ• 8 min read ๐Ÿ›  Built-in Tools

What Does โ€œThe File Is Being Used by Another Processโ€ Mean in Windows?

The message โ€œThe action can't be completed because the file is open in another programโ€, โ€œThe process cannot access the file because it is being used by another processโ€, or a similar file in use error appears when Windows cannot complete an operation because the file is locked.

A lock usually means that an application, background service, system component, antivirus scanner, backup program, cloud sync client, or another user session currently has an open handle to that file. While that handle is active, Windows may block deletion, renaming, moving, overwriting, or saving changes to prevent data corruption.

๐Ÿ’ก
Important This error does not always mean something is wrong. In many cases, Windows is protecting a document, database, archive, video, installer, or system file that is currently being read or written.

Typical Error Messages

Why Windows Says a File Is Open in Another Program

Before forcing anything, it helps to understand what may be holding the file. The most common causes are simple and can be fixed without special utilities.

Open application A document is still open in Word, Excel, Notepad, Photoshop, a media player, or another editor.
File Explorer preview The Preview pane, Details pane, or thumbnails are reading the file in File Explorer.
Background process An updater, installer, indexing service, backup tool, or antivirus scan is accessing the file.
Cloud synchronization OneDrive, Google Drive, Dropbox, or another sync client is uploading, downloading, or checking the file.
Network share session Another computer or user has the file open from a shared folder.
System or protected file Windows itself may be using DLLs, logs, drivers, temporary files, or active program files.

Quick Fixes for โ€œFile Is Open in Another Programโ€

Try these basic steps before using advanced tools. In most cases, one of them releases the locked file immediately.

  1. Close the program that may be using the file. For example, close Word before deleting a .docx file or close a media player before moving a video.
  2. Wait 10โ€“30 seconds if the file was just downloaded, copied, extracted, or saved. Windows Defender, Search Indexer, or a sync client may still be checking it.
  3. Close File Explorer windows that show the same folder.
  4. Press F5 in File Explorer and try again.
  5. Restart the app that was working with the file.
  6. Restart Windows if you do not know which program has locked the file.
โœ…
Best first step If the file is not urgent, simply restarting the computer is often the safest and fastest way to release a stale file handle.

Close the App That Is Using the File

If the file is a document, image, video, archive, installer, spreadsheet, or project file, start by closing the application associated with that file type.

  1. Look at the file extension: .docx, .xlsx, .jpg, .mp4, .zip, .exe, and so on.
  2. Close the matching program, such as Microsoft Word, Excel, Photos, VLC, 7-Zip, WinRAR, Photoshop, Visual Studio Code, or the installer window.
  3. Check the system tray near the clock. Some apps stay open in the background after you close the main window.
  4. Right-click the tray icon and choose Exit, Quit, or Close.
  5. Try to delete, rename, move, or save the file again.

Example: A Video File Will Not Delete

If Windows says an .mp4 file is open in another program, close video players, video editors, thumbnail generators, screen recorders, and File Explorer preview windows. Large media files are often locked while Windows generates thumbnails or reads metadata.

End the Process Holding the File in Task Manager

If closing the visible window does not help, the program may still be running as a background process. Task Manager lets you close it manually.

  1. Press Ctrl + Shift + Esc to open Task Manager.
  2. In Windows 11, open the Processes page. In Windows 10, click More details if needed.
  3. Look for the app that may be using the file.
  4. Select it and click End task.
  5. Return to File Explorer and repeat the operation.
โš ๏ธ
Be careful Do not end random Windows system processes. Ending the wrong process may close your desktop session, interrupt file copying, or cause unsaved data loss.

Processes That Commonly Lock Files

Process or App Typical Files Locked What to Do
explorer.exe Images, videos, folders, archives Restart Windows Explorer.
Microsoft Office apps .docx, .xlsx, .pptx Close the document and check for hidden Office windows.
OneDrive or Dropbox Synced folders and cloud files Pause sync temporarily.
Antivirus or backup tools Recently downloaded, copied, or changed files Wait for scanning or backup to finish.
Development tools Logs, databases, source files, build output Stop the local server, terminal task, debugger, or IDE.

Restart Windows Explorer to Release File Explorer Locks

File Explorer itself can lock files while showing previews, thumbnails, metadata, or folder contents. Restarting Explorer refreshes the desktop and often releases the locked file.

  1. Press Ctrl + Shift + Esc.
  2. Find Windows Explorer in the Processes list.
  3. Select it.
  4. Click Restart.
  5. Wait for the taskbar and desktop icons to reload.
  6. Try the file operation again.
Alternative commandtaskkill /f /im explorer.exe
start explorer.exe

Use this command only from Command Prompt or the Run dialog if the graphical restart option does not work.

Disable Preview Pane, Details Pane, and Thumbnails in File Explorer

Preview Pane is convenient, but it can keep documents, PDFs, videos, images, and text files open. If the error appears when you are working inside a folder, disable previews and thumbnails.

Turn Off Preview Pane

  1. Open File Explorer.
  2. Press Alt + P to toggle the Preview pane off.
  3. On Windows 11, you can also select View โ†’ Show โ†’ clear Preview pane.
  4. Try to rename, delete, or move the file again.

Turn Off Thumbnails

  1. Open File Explorer Options. You can search for it from the Start menu.
  2. Go to the View tab.
  3. Enable Always show icons, never thumbnails.
  4. Click Apply and OK.
๐Ÿ’ก
Useful for media folders This is especially helpful for folders with many large photos, videos, PDFs, or compressed archives.

Find Which Process Is Using a File with Resource Monitor

Resource Monitor is built into Windows and can show which process has a handle to a file, folder, or path. This is the best built-in method when Windows does not name the locking program.

  1. Press Win + R.
  2. Type resmon and press Enter.
  3. Open the CPU tab.
  4. Expand Associated Handles.
  5. In the search box, type part of the file name or folder name.
  6. Look at the Image column to identify the process that is using the file.
  7. Close the related app normally, or end it from Task Manager if necessary.
Run commandresmon

For example, if you search for report.xlsx and Resource Monitor shows EXCEL.EXE, close Excel. If it shows explorer.exe, restart Windows Explorer or disable Preview Pane.

Delete, Rename, or Move a Locked File Using Command Prompt or PowerShell

Command-line tools do not bypass every lock, but they can help when File Explorer is the problem or when you need to remove a file from a path with special characters, long names, or permission issues.

Open Terminal as Administrator

  1. Right-click the Start button.
  2. Select Terminal (Admin), Windows PowerShell (Admin), or Command Prompt (Admin).
  3. Confirm the User Account Control prompt.

Delete a File from Command Prompt

Command Promptdel /f /q "C:\Path\To\File.txt"

Rename a File from Command Prompt

Command Promptren "C:\Path\To\OldName.txt" "NewName.txt"

Delete a File from PowerShell

PowerShellRemove-Item -LiteralPath "C:\Path\To\File.txt" -Force

Delete a Folder from PowerShell

PowerShellRemove-Item -LiteralPath "C:\Path\To\Folder" -Recurse -Force
Do not run delete commands on system folders. Never use these commands on C:\Windows, C:\Program Files, C:\Users, or unknown folders unless you are absolutely sure what you are deleting.

Delete or Rename the File in Safe Mode

Safe Mode starts Windows with a minimal set of drivers and services. If a third-party app, startup item, antivirus component, shell extension, or sync client keeps locking the file, Safe Mode may let you remove or rename it.

  1. Open Settings.
  2. Go to System โ†’ Recovery.
  3. Under Advanced startup, click Restart now.
  4. Select Troubleshoot โ†’ Advanced options โ†’ Startup Settings.
  5. Click Restart.
  6. Press 4 or F4 to start Safe Mode.
  7. After Windows starts, delete, rename, or move the file.
  8. Restart normally.

If the file still cannot be removed in Safe Mode, it may be a protected system file, a file with permission problems, a corrupted file system entry, or a file used by a core Windows component.

Pause OneDrive, Google Drive, Dropbox, or Other Cloud Sync Apps

Cloud synchronization tools can lock files while uploading, downloading, comparing versions, resolving conflicts, or applying metadata. This is common in Desktop, Documents, Pictures, and shared work folders.

  1. Look for the cloud sync icon in the system tray near the clock.
  2. Right-click the icon.
  3. Select Pause syncing, Pause sync, or a similar option.
  4. Wait a few seconds.
  5. Try the file operation again.
  6. Resume sync after the file is deleted, moved, or renamed.

Signs That Sync Is the Cause

Fix โ€œFile in Useโ€ Errors on Network Shares

When a file is stored on a shared folder, NAS, server, or another PC, the locking process may not be on your computer. Another user or device may have the file open.

If You Are a Regular User

  1. Ask other users to close the file.
  2. Check whether the file is open in another session on your own PC.
  3. Disconnect and reconnect the network drive.
  4. Restart your computer and try again.

If You Manage the Shared Computer

  1. Press Win + R, type compmgmt.msc, and press Enter.
  2. Go to System Tools โ†’ Shared Folders โ†’ Open Files.
  3. Find the locked file.
  4. Right-click it and choose Close Open File if you are sure it is safe.
โš ๏ธ
Data loss warning Closing an open network file can discard another user's unsaved changes. Use this only when you know the file is not being actively edited.

Check the Disk if the File Stays Locked or Cannot Be Deleted

If the file remains locked after a restart, Safe Mode, and process checks, the issue may be related to file system errors, bad metadata, an interrupted write operation, or disk corruption.

Run CHKDSK

  1. Open Terminal or Command Prompt as administrator.
  2. Run the command below, replacing C: with the correct drive letter if needed.
  3. If Windows asks to schedule the scan at the next restart, type Y and press Enter.
  4. Restart the computer.
Command Promptchkdsk C: /f

For external drives, USB flash drives, or memory cards, close all apps first, run chkdsk, and safely eject the device after the scan is complete.

How to Prevent โ€œFile Is Used by Another Processโ€ Errors

You cannot prevent every locked file, but good habits reduce the number of repeated errors.

Frequently Asked Questions About Locked Files in Windows

Can I force delete a file that is open in another program?

Sometimes, yes, but it is safer to close the program first. Forcing deletion while data is being written can corrupt the file, break an application, or cause data loss. Use force deletion only when you understand what the file is and why it is locked.

Why does File Explorer lock my images or videos?

File Explorer may read images, videos, PDFs, and archives to create thumbnails, show metadata, or display a preview. Turning off Preview Pane and thumbnails often fixes this behavior.

Why does the error return after I restart?

A startup app, background service, sync client, backup tool, or antivirus component may reopen the file after Windows starts. Use Resource Monitor to identify the process, or boot into Safe Mode to test whether third-party startup items are involved.

Is it safe to use third-party unlocker tools?

They can be useful, but they should be used carefully. Download such tools only from reputable sources, avoid bundled installers, and do not unlock system files unless you know the consequences. Built-in tools such as Resource Monitor, Task Manager, Safe Mode, and Command Prompt are usually enough.

What if the file is used by System?

If Resource Monitor shows System or another core Windows process, do not force delete the file immediately. It may be a driver, log, cache, update file, page file, hibernation file, or protected operating system component. Research the file name and path before changing it.

How do I know whether the file is malware?

A locked file is not automatically malware. Suspicious signs include a random file name, an unknown location, repeated recreation after deletion, high CPU usage, unknown startup entries, or security warnings. Scan the file or folder with Windows Security and check startup items if you suspect infection.

Conclusion: The Safest Way to Fix a File Locked by Another Process

The Windows file is open in another program error usually means a normal application, File Explorer, a sync client, a background process, or another network user still has the file open. Start with safe fixes: close related programs, restart Explorer, turn off Preview Pane, pause cloud sync, and reboot if needed.

If the problem continues, use Resource Monitor to identify the exact locking process. For stubborn cases, try Command Prompt, PowerShell, Safe Mode, or a disk check. Avoid forcing deletion of unknown system files, because removing the wrong locked file can damage Windows or cause data loss.

โœ…
Recommended order Close apps โ†’ restart Explorer โ†’ disable Preview Pane โ†’ check Resource Monitor โ†’ pause sync โ†’ restart Windows โ†’ Safe Mode โ†’ disk check.