The action can't be completed because the file is open in Windows Explorer.

Anonymous
2010-06-25T20:15:08+00:00

OK, this one seems to be coming up a lot but no one's been able to answer it (including Microsoft) so I'll ask and be as specific as I can.

Because I work with vector art I have to constantly save files by over-writing them and everything was cool with WinXP pro.  I just got Win7 Pro and everything was cool, until recently.  Whenever I tried to overwrite my files, I'd get error messages saying the file was either read-only or was open elsewhere, but it only happened about 50% of the time.  A had to start re-saving files with different names.  after getting the files re-saved i would then try to delete and rename the files, but found i couldn't do either, as I was constantly getting the error message 'The action can't be completed because the file is open in Windows Explorer.'  Closing and reopening explorer does nothing.  Someone else mentioned emptying the recycle bin works, but not for me.  Being that the files are on an external drive I attempted to disable write caching through device manager and the windows Management Console (or whatever) froze up and took the pc with it (nice job, MS!).  Rebooting seems to fix the problem for a little bit, but it returns quickly and at random.  It also seems to pick files at random to lock up.  Some files I can't change, some I can.  Others start functioning after a while of inactivity.

I tried disabling thumbnails in Explorer and even added a NoThumbnailCache DWORD in the registry, but it still happens.  I'm basically going to have to save all new files over and over again and only occasionally be able to delete the old ones while only randomly being able to over-write others.  This issue seems to be plaguing Vista and Win7 and people have been waiting for a fix, but Microsoft's been very mum on the issue.  If anyone can come up with a fix, that would be great.  This is killing my productivity!

Windows for home | Previous Windows versions | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2011-01-16T08:58:38+00:00

Here are some solutions :

Solution 1: Use CMD.

0- Note that the following 3 steps are going to terminate your explorer.exe process, so your desktop and all of windows explorer open folders and any other related process would be terminated.

1- Run Task Manager. ( by pressing ctrl + shift + esc or etc)

2- Go to Processes tab.

3- Find "explorer.exe" and click "end process" button. If you find more than one explorer.exe, kill them all.

4- Now, click the file menu -> New Task (Run...)

5- Type CMD and click OK.

6- Now you can do any thing that you couldn't did before with this UI. Some useful commands :

  • cd : Changes the current directory. Use "CD .." to do the "Up Button" in windows explorer.
  • dir : Lists the existing file and folders in current directory. Use "dir /p" to list it in pages.
  • del [File Name] : Deletes the existing [File Name] file in the current directory.
  • rename [Old File Name] [New File Name] : Renames the existing [Old File Name] file or directory existing in the current directory to [New File Name].

Solution 2: Use another file manager.

0- Install and execute another file manager like "XYPlore".

1- Note that the following 3 steps are going to terminate your explorer.exe process, so your desktop and all of windows explorer open folders and any other related process would be terminated.

2- Run Task Manager. ( by pressing ctrl + shift + esc or etc)

3- Go to Processes tab.

4- Find "explorer.exe" and click "end process" button. If you find more than one explorer.exe, kill them all.

5- Use XYPlore UI and do what ever you want.

Please note that the problem could happen with this kind of external explorers too. So close any file and go to a safe directory after your work.

Solution 3: Do it your self!

If you can program, there are some codes that could help you. These codes that Im talking about, will tell MS Windows to delete your annoying pinned files just before shutting down the system.

Here is a sample one:

MoveFileEx('C:\windows\system32\ld21E.tmp',nil,MOVEFILE_REPLACE_EXISTING or MOVEFILE_DELAY_UNTIL_REBOOT);

This code will work properly in Borland Delphi Compilers, and as you can see, the file "ld21e.tmp" will be removed after compiling this code and restarting your windows.

Was this answer helpful?

100+ people found this answer helpful.
0 comments No comments
Answer accepted by question author
Anonymous
2011-01-21T04:51:54+00:00

There will never be a Hotfix because in general its not caused by Windows. Sure, in cases where it can be reprduced and explained, one particular root cause can be fixed via a Hotfix. In general this can be caused by anykind of Scenarios and Software. Please read my answer from a different thread some topic.

The official KB Aricle can be found at the bottom on the handle.exe Site:

The issue is mostly never caused by Windows itself. Tools like AV Software, are mostly the rootcause. Due to a bad timing issue the file get then stucked forever, until reboot.

If you are lucky the lock releases, after you close all open windows and wait a minute.

Sometimes you can find something checking the properties of the locked file, using the process explorer tool. 

What always work is the Tool handle.exe from Sysinternals. Its a command line tool, showing you what process is having an active handle on this file and gives you the option to release it.  The handle tool should not take as general solution but it should point you to he "bad" software holding the file. You can then take action and for example reconfigure your AV, or remove some 3rd Party app you dont need.

In general you should disable all software on startup, visisble with msconfig.exe  In addition you can disable all non-microsoft services here, which you don’t need. And these are usually a lot after checking for the first time.

There are situation where the lock does not get released after reboot. The root cause was probably the same, unable for a program to clean up after themselves. Here you need to go to the security settings of the file. Dont try to change the permissions if you don’t have permission’s of course :-)  If you are an administrator you need to take the OWNERSHIP first before be able to change the security permissions. You will find the option in the security settings sa well.

As an example an Windows Hotfix was installed and AV Software was running all time. After the installation the pc wants to restart, but the AV Software has still an open handle on the installation folder. If the lock does not release, Windows will restart the Machine anyway, causing a locked folder which yoi need to take the ownership first.

In some cases I have seen that it does not want to fully delete all the folders and subs. In this case a file or empty folder was left in one of the subfolders. Go there delete the very last one and delete the locked root folder.

Handle.exe:

http://technet.microsoft.com/en-us/sysinternals/bb896655

Process Explorer:

http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

I agree I find this issue also very annoying and happened to me a couple of times already. Hopefully the handle,exe will be sooner or later integrated in the explorer, so it could display a message immediately pointing to the process holding the handle.

So if we all say PLEASE, we might get integrated what bothers me since W2003. 

BTW - Instead of saying please, you need to log new feature ideas to MS Connect, the only chance it ever gets picked up...

Regards

Martin

Was this answer helpful?

20+ people found this answer helpful.
0 comments No comments

164 additional answers

Sort by: Most helpful
  1. Anonymous
    2010-07-23T00:35:15+00:00

    I'm with Macintrasher 100%.

    Recently updgraded my Dell M90 to Win7 Enterprise 64bit.

    The phantom locked file issue (the action can't be completed becausee the folder or a file in it is ...) is driving me crazy - pretty hard to beleive M doesn't know what's wrong or how to fix it.  I NEVER had this problem with Vista or XP, now I'd say it occurs AT LEAST daily.

    Unfortunately downgrading back to XP is not an option for me so I have to live with this.

    I tried Macintrasher's task mgr - delete explorer.exe task suggestion, didn't work.  Deleting the last explorer.exe wipes out the user interface but you can start a new explorer.exe task in applications tab to bring it back.  Doesn't work anyways.

    I have found that a system restart clears the (not really) locked files, but this is certainly not acceptable solution - problem soon returns anyways.

    Also agree with Macintrasher I shoudn't have to perform a clean boot - create new user accounts - etc., especially with evidence this does any good.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2010-07-01T15:47:31+00:00

    Final Update.  I checked for more solutions and couldn't find anything for this particular problem.  Something in how explorer.exe was coded is causing the random read-only states and not a single solution works.  Because of how bad this problem was I rolled back to WinXP Pro and will only use the older OS until a fix for this issue is found and distributed.  This is one of the only times a problem with Windows has stumped me to the point where I just had to give up and accept it (the last being Win98's inherent memory leak, which wasn't solved till the release of Win2000).

    Simply put, I can't use or rely on Win7 as long as this problem persists.  It destroys my productivity and eats away at my hard drive space.  Microsoft really dropped the ball on this one and I'm quite amazed that this hasn't caused more issues with more people.  Until this problem's fix I can never use Windows 7 for anything.  Thanks a ton, guys.

    I also have another pc with Win7 Pro 64 and it's starting to show the same symptoms, although not as frequently.  As this has apparently been an issue since Vista I'm quite disturbed that Microsoft hasn't fixed it by now.  I give up on this OS and wipe my hands clean of it till the problem is isolated and a solution is found.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2010-06-28T16:27:48+00:00

    Second update.  I noticed another odd thing that wasn't happening before.

    It seems my Taskbar is no longer highlighting the icons pinned to it when that particular program is already running, nor does it bring up a preview window when I hover over the icons.  Also, the icons don't function properly when a program is open, i.e. it functions like the old quicklaunch icons did by opening another instance of the program rather than bringing the running program to the front.  For example, I'll have IE open, then minimize it and do something else.  Then I'll click on the IE icon again and a whole new window opens.  I'd forget about the other open window and do this several times, ending up with a bunch of open IE windows and my pc slowing down from lack of memory.  I noticed this only after I reinstalled DisplayFusion and saw several IE tabs in the secondary taskbar that the program nicely provides.  Running programs that appear that aren't originally pinned to the taskbar function normally, tho, so it's specific to items pinned quick-launch style.

    Speaking of which, how come windows can't provide a taskbar on multiple monitors without using a clone setup or a third-party program?  I have a monitor and a television on one pc that serves two individual purposes, so why can't I have 2 fully functional taskbars on each screen in a multiple resolution environment?  And, no, I'm not doing a span of the taskbar, that looks stupid and still limits the Start menu to one monitor.

    Anyways, I just think there's some inherent problem with the explorer.exe service (not the file explorer).  What exactly is causing it and why some people are affected while others aren't still needs to be determined.  Is anyone at Microsoft going to raise an eyebrow at this at some point?

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments