Can't rename or delete a folder in win 10, msg: the action cannot be completed because a file or folder in it is open in another program

Yiru Chen 686 Reputation points
2021-04-06T23:21:47.023+00:00

Can't rename or delete a folder in win 10, msg: the action cannot be completed because a file or folder in it is open in another program.

Tried different ways, it still can't be deleted or renamed

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

Accepted answer
  1. Yiru Chen 686 Reputation points
    2021-04-07T21:24:03.583+00:00

    Thanks all for tips. I did try empty recycle bin and delete all files in "Temp" folder, clear processes related. But nothing worked. I had computer shutdown in weekend and power back on Monday, but it is still locked. I needed to keep the work session for a meeting so I did not try Reboot yesterday.

    Today I just rebooted the computer and folder is released ! and I am able to rename it and able to delete it !

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. MotoX80 36,401 Reputation points
    2021-04-07T00:33:38.397+00:00

    You have to close the program that has the folder open. Run the handle tool to search for open file handles.

    https://learn.microsoft.com/en-us/sysinternals/downloads/handle

    From an admin command prompt run handle.exe followed by the folder name.

    1 person found this answer helpful.
    0 comments No comments

  2. Castorix31 90,686 Reputation points
    2021-04-07T04:58:44.163+00:00

    You can use a free tool like IObit Unlocker
    It will be added in Righ-Click Explorer Context menu, allowing to unlock and delete easily locked files/folders

    0 comments No comments

  3. Teemo Tang 11,466 Reputation points
    2021-04-07T09:10:57.493+00:00

    Try to empty the temp data folder and Recycle Bin firstly.
    In the Windows search box type %temp% and press Enter. You will be taken to the C:\Users\username\AppData\Local\Temp folder. Delete all the files in this folder.
    Besides, use Process Explorer, when you right-click, you also have the ability to Kill Process Tree, which will also close any other associated processes. Now try to copy or move the folder or file that was giving you an error.
    Get Process Explorer from here:
    https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer

    -------------------------------------------------------------------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.