Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
Redmond desk3 min

How to Delete, Move, or Rename a File That’s Locked in Windows

Close likely apps, identify any remaining process holding the file, and retry. If no process is responsible, check permissions, corruption, path length, and invalid names.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If Windows says a file or folder is open in another program, close the likely app first. If the warning persists, find the process holding the item open, let that process release it, then retry. If no process is using it, check permissions, file-system health, path length, or an invalid name instead—those problems can produce similar failures.

Why Windows says a file is in use

An app or background process can keep a file or folder open after its visible window has closed. When that open handle prevents another operation, Windows may block the delete, move, or rename. Microsoft’s NTFS troubleshooting guidance states that a file cannot be deleted while it is being used.

As an Amazon Associate I earn from qualifying purchases.

Start with the app most likely to have touched the item: an editor, media player, archive utility, sync client, or command window whose current directory is inside the folder. Close it normally and retry. Avoid ending an unfamiliar system process just because it appears in a search result.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Find the process holding the file or folder

Use one of these Microsoft-supported utilities, depending on whether you prefer File Explorer, a graphical search, or the command line.

#1 Best Overall
Tool Best fit Access and caution
PowerToys File Locksmith A File Explorer context-menu workflow. Can scan a selected directory recursively. Processes running as another user may not appear unless you restart it as administrator.
Process Explorer A graphical search for processes holding a handle. Microsoft Sysinternals documentation lists version 17.14 and Windows 11 and higher client support.
Handle Command-line searches for open file references. Requires administrative privilege. Forcing a handle closed can cause application or system instability.

Use File Locksmith from File Explorer

  1. Enable File Locksmith in PowerToys.
  2. In File Explorer, right-click the file or folder, open the expanded context menu, and select Unlock with File Locksmith.
  3. Review the process list. For a directory, File Locksmith scans its files and subdirectories. If a process may be running as another user and is missing from the results, choose Restart as administrator and scan again.
  4. Close the owning app normally if possible. File Locksmith also offers an End task action; use it only when you understand what the process does.

See Microsoft’s File Locksmith documentation for its workflow and visibility limits.

Search with Process Explorer

Download and run Process Explorer, then use its search function to find processes with a handle to the file or folder. Check the result before acting: a process name alone does not establish that it is safe to terminate. Microsoft’s current page lists version 17.14 and Windows 11 and higher client support.

Rank #2
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
  • 256 GB SSD of storage.
  • Multitasking is easy with 16GB of RAM
  • Equipped with a blazing fast Core i5 2.00 GHz processor.

Search from an elevated command line with Handle

Handle searches for open file references. Run it with administrative privilege and provide a distinctive part of the file or folder name; the search term can match anywhere in the path. Review the output to identify the process and handle.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Handle documents an option to close a specified handle, but Microsoft warns that doing so can cause application or system instability. Prefer closing the application or process normally so it releases the item itself. Forced handle closure is an advanced measure, not the routine fix.

Rank #3
15.6 Inch Win 11 Laptop Computer, N4020, 4GB DDR4 RAM, 128GB Storage | LPDDR4 RAM, 180° Lay-Flat, Dual-Band WiFi, Type-C PD Fast Charging, Thin & Lightweight for Students, Home & Office, Gray
  • WINDOWS 11 | STABLE PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 system, this laptop delivers stable performance for everyday computing tasks. It supports web browsing, online learning, document editing, email communication, and basic office work with optimized power efficiency, providing a practical and reliable experience for essential daily use for daily use.
  • 15.6” FHD IPS DISPLAY: Features a 15.6-inch Full HD IPS display with narrow bezels, offering wider viewing angles and clearer image details compared to standard panels. The improved screen-to-body ratio enhances visual experience for study, reading, document work, and video playback, making it suitable for both productivity and entertainment use.
  • 4GB DDR4 + 128GB eMMC STORAGE: Equipped with 4GB DDR4 memory and 128GB eMMC storage for everyday basics such as browsing, documents, email, and online learning platforms. The built-in TF card slot supports storage expansion up to 1TB, giving you more flexibility for files, photos, videos, and daily documents. TF card not included.
  • CONNECTIVITY & PORTS: Includes 1× TF card slot, 2× USB 3.2 Gen1 ports, and 2× full-featured Type-C ports (USB 3.2 Gen1). The Type-C ports support data transfer, charging, and video output, enabling flexible connection with external devices such as monitors, storage, and peripherals for daily work and study use.
  • LIGHTWEIGHT DESIGN | ONLINE COMMUNICATION: Designed with a slim, portable profile, this laptop is easy to carry for school, commuting, and travel. A built-in 1MP front camera supports online classes, video meetings, remote communication, and everyday conferencing. The 3300mAh battery works with the low-power system design to support practical daily use, while thermal optimization helps maintain quieter operation during extended tasks.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Retry, then check other causes if it still fails

Once the process releases the item, try the delete, move, or rename again. A delete request can be accepted while the file remains pending deletion until the process lets go. If no process is identified—or the operation still fails—work through these other possibilities:

  • Permissions: Your account may not have permission to delete or modify the item. Microsoft notes that ACL restrictions may require changing permissions or taking ownership. Treat ownership as a permissions remedy, not a way to clear an open handle.
  • File-system corruption: If there are signs of corruption, Microsoft recommends running Chkdsk on the affected volume. Recovery of file data is not guaranteed, so identify the correct volume and consider your backup situation before running a repair.
  • Excessive path length: Some programs cannot handle paths that NTFS can store. Microsoft describes shortening or remapping the path among the possible remedies.
  • Reserved or invalid name: Reserved device names and names ending in a space or period can defeat ordinary Win32 file operations even when no process has the item open. Microsoft documents special path syntax and other remedies for these cases.

Microsoft’s full NTFS deletion troubleshooting guide covers these causes and remedies.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.