sodcalculator

10 Tech How-To

Fix Unable to Rename Folder in Windows

Guide 10-28133 · Updated · Step by step

If Windows won’t let you rename a folder, the cause is almost always a file being held open by a running program, a permission issue, or a corrupted thumbnail cache. The quickest fix is to close the program using the folder, then try again; if that fails, restart Windows Explorer or use the Command Prompt to rename it.

Why Windows Blocks Folder Renames

Windows locks a folder when any file inside it is open by a process, even if that process is running in the background. This is a safety feature: renaming a folder while a program is writing to it could corrupt data or break the program’s path references. Common culprits include:

  • File Explorer windows showing the folder’s contents
  • Media players scanning or playing files in the folder
  • Cloud sync apps (OneDrive, Dropbox, Google Drive) monitoring the folder
  • Antivirus software scanning files on access
  • Windows Search indexing the folder

Less obvious reasons include permission restrictions (you don’t have write access to the parent folder) and a corrupted thumbnail cache that makes Explorer think the folder is in use.

Quick Fixes to Try First

Start with these low-risk steps before moving to advanced solutions:

  1. Close all open windows that show the folder or its contents. Press Ctrl+W in each Explorer window.
  2. Close background programs that might access the folder: media players, PDF readers, image viewers, and office apps.
  3. Wait a few seconds and try renaming again. Sometimes a program releases the handle after a short delay.
  4. Restart File Explorer – open Task Manager (Ctrl+Shift+Esc), find “Windows Explorer” under Processes, right-click it, and choose “Restart.” This clears many temporary locks.

If the folder still won’t rename, move on to the more targeted fixes below.

Using Command Prompt to Force a Rename

The Command Prompt can rename a folder even when Explorer refuses, because it doesn’t check for open handles the same way. This works best when the lock is from a background process that you can’t easily identify.

  1. Press Win+R, type cmd, and press Ctrl+Shift+Enter to run as administrator.
  2. Navigate to the parent directory of the folder you want to rename. For example, if the folder is C:\Users\YourName\Documents\OldName, type:
    cd /d C:\Users\YourName\Documents
  3. Type the rename command:
    ren "OldName" "NewName"
  4. If you get “Access is denied,” you’ll need to take ownership first (see the permissions section below).

If the command succeeds, the folder is renamed. If it fails with “The process cannot access the file because it is being used by another process,” you still have an active lock.

Finding and Ending the Locking Process

When you need to know exactly which program is holding the folder, use the built-in Resource Monitor or a third-party tool like Process Explorer (free from Microsoft).

Using Resource Monitor:

  1. Press Win+R, type resmon, and press Enter.
  2. Go to the CPU tab.
  3. Expand the Associated Handles section at the bottom.
  4. In the search box, type the folder’s name (or part of it). A list of processes with handles to that folder appears.
  5. Right-click each process and choose End Process – but only if you recognize it and it’s safe to close (e.g., a media player or a text editor).

If you don’t recognize the process, don’t kill it blindly. Search online for the process name to see if it’s a system component or a known program.

Checking and Fixing Folder Permissions

If you get “You need permission to perform this action” or “Access is denied,” the folder’s permissions are the problem. This often happens when the folder was created by another user account or after a system migration.

  1. Right-click the folder and select Properties.
  2. Go to the Security tab.
  3. Click Advanced.
  4. Next to “Owner,” click Change.
  5. Type your Windows username, click Check Names, then OK.
  6. Check the box “Replace owner on subcontainers and objects” and click OK.
  7. Back in the Security tab, click Edit, select your user, and check Full control under Allow.
  8. Click OK and try renaming again.

Note that taking ownership of system folders (like C:\Windows) is not recommended and can destabilize Windows. Only do this on user-created folders.

Clearing the Thumbnail Cache

A corrupted thumbnail cache can sometimes prevent renaming, especially for folders containing images or videos. The cache is stored in hidden files, and clearing it is safe – Windows rebuilds it automatically.

  1. Open File Explorer and go to C:\Users\YourName\AppData\Local\Microsoft\Windows\Explorer.
  2. Show hidden files if needed: View tab → check “Hidden items.”
  3. Delete all files that start with thumbcache_ and iconcache_.
  4. Restart File Explorer (see Quick Fixes).

If you prefer, you can use the Disk Cleanup tool: search for “Disk Cleanup,” select your drive, check “Thumbnails,” and click OK.

When All Else Fails: Safe Mode and Restart

If none of the above works, the lock might be from a driver or a system service. Booting into Safe Mode loads only essential drivers and services, which often releases the folder.

  1. Open Settings → System → Recovery → Advanced startup → Restart now.
  2. Choose Troubleshoot → Advanced options → Startup Settings → Restart.
  3. Press 4 to boot into Safe Mode.
  4. Try renaming the folder there. If it works, the problem is a third-party service or driver.
  5. Exit Safe Mode (restart normally) and disable suspicious startup programs via Task Manager → Startup tab.

As a last resort, a full restart of Windows will clear all file handles. If the folder still won’t rename after a reboot, the issue is likely with the folder’s own metadata or a very stubborn process – consider copying the contents to a new folder and deleting the original.

Frequently Asked Questions

Why does it say “The action can’t be completed because the folder is open in another program”?
This is Windows’ way of saying a process has an open handle to the folder or a file inside it. Even if you don’t see a window, a background program like a cloud sync client or a media indexer may be accessing it. Use Resource Monitor to find the exact process.

Can I rename a folder while a file inside is being used?
No, not safely. Windows blocks the rename to prevent data corruption. You must close the program using the file first. If you need to keep the file open, you can copy the folder to a new name instead of renaming it.

Does renaming a folder break shortcuts or program paths?
Yes. If you rename a folder that is referenced by a shortcut, a program’s configuration, or a batch script, those references will break. For example, if a game is installed in C:\Games\MyGame and you rename MyGame, the game’s launcher may fail to find its files. You’ll need to update the paths or recreate shortcuts.

Why can’t I rename a folder on a network drive?
Network drives often have permissions set by the server administrator. You may have read-only access, or another user may have the folder open. Check with the network administrator or try renaming the folder on the server itself.

Is it safe to use third-party tools to unlock folders?
Most reputable tools work by ending the process that holds the handle, which is safe if you know what you’re closing. However, ending a system process can cause instability. Always prefer built-in methods first, and only use third-party tools from trusted sources.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →