How to Fix ‘Folder In Use’ When Deleting or Renaming a Folder in Windows 11

Trying to rename an old project directory or delete a temporary downloads folder in Windows 11 only to hit the stubborn popup “Folder In Use: The action can’t be completed because the folder or a file in it is open in another program” – even after you closed Word, Excel, and PDF readers – happens because a background process, Windows Explorer thumbnail cache, or OneDrive sync handle is quietly holding an invisible lock on a file inside.

Fix 1: Close Hidden Preview Panes and Restart Windows Explorer

More often than not, Windows File Explorer itself is the “other program” locking the folder – especially if you left the Preview Pane switched on or viewed an image/video thumbnail inside that folder moments ago.

  1. Inside File Explorer, check the toolbar for View > Show > Preview pane and turn it off if active, then navigate one folder level up so you are not viewing inside the folder you want to delete.
  2. If the popup persists, press Ctrl + Shift + Esc to open Task Manager.
  3. Locate Windows Explorer under Processes, right-click it, and click Restart.
  4. Your taskbar and desktop will blink for two seconds, releasing any stalled thumbnail or shell locks so you can rename or delete the folder immediately.

Fix 2: Find Exactly Which Hidden App Is Locking the Folder With Resource Monitor

Instead of guessing and closing twenty open apps at random, Windows 11 includes a built-in diagnostic tool that tells you the exact process name holding your folder hostage.

  1. Press Win + R, type resmon, and press Enter to open Resource Monitor.
  2. Click the CPU tab along the top.
  3. Look near the bottom-right area and click Associated Handles to expand it.
  4. Type the exact name of your locked folder (for example, Project2026) into the Search Handles box and wait 5 seconds while Windows scans open locks.
  5. Every process locking files inside that directory appears in the list (common culprits include SearchProtocolHost.exe, OneDrive.exe, Acrobat.exe, or a lingering background browser worker).
  6. Right-click the offending background process (as long as it is not a critical Windows system kernel component) and select End Process, then delete or rename your folder cleanly.

Fix 3: Check Command Prompt / PowerShell Windows and Microsoft PowerToys File Locksmith

  • Check Terminal working directories: If you left a Command Prompt, PowerShell, or VS Code terminal parked inside cd C:\YourFolder, Windows treats the folder as actively in use. Close the terminal or run cd .. to step out first.
  • One-click File Locksmith (Windows 11 PowerToys): If you hit file locks frequently, Microsoft’s official free PowerToys suite adds an Unlock with File Locksmith option directly to your Windows 11 right-click menu, listing and closing locking processes without opening Resource Monitor at all.

Fix 4: Pause OneDrive Syncing Temporarily on Cloud Folders

Folders located inside Desktop, Documents, or OneDrive frequently lock momentarily while OneDrive uploads metadata or verifies offline copies. Click the blue cloud OneDrive icon in your bottom-right taskbar tray, click the gear icon, choose Pause syncing > 2 hours, rename or delete the folder, and resume syncing right afterwards.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.