The undeletable Outlook folder


For a while, I've had a few "undeletable Outlook folders". Even after deleting all the messages from them, Outlook just complains when I try to delete them. There was some sort of error message, but of course I didn't read it. The only option was OK, so I clicked it. As I recall, the message said something about "Can't delete because blah blah pending synchronization blah blah." I don't know what "pending synchronization" is, but it must be important if Outlook won't let me delete a folder because of it.

Meanwhile, I also noticed that my Sync Issues folder grew by about a dozen error messages every day, and I had to go clean them out every so often. The messages looked something like this:

9:26:59 Synchronizer Version 11.0.6352
9:26:59 Synchronizing Mailbox 'Raymond Chen'
9:26:59 Synchronizing local changes in folder '0618'
9:26:59 Error synchronizing folder
9:26:59		 [80004005-501-4B9-0]
9:26:59		 The client operation failed.
9:26:59		 Microsoft Exchange Server Information Store
9:26:59		 For more information on this failure, click the URL below:
9:26:59		 http://www.microsoft.com/support/prodredirect/outlook2000_us.asp?err=80004005-501-4b9-0
9:27:00 Synchronizing local changes in folder '0611'
9:27:00 Error synchronizing folder
9:27:00		 [80004005-501-4B9-0]
9:27:00		 The client operation failed.
9:27:00		 Microsoft Exchange Server Information Store
9:27:00		 For more information on this failure, click the URL below:
9:27:00		 http://www.microsoft.com/support/prodredirect/outlook2000_us.asp?err=80004005-501-4b9-0
9:27:01 Done

I clicked the link to obtain further information, but the instructions there didn't solve my problem. I just chalked this up to "Outlook gets that way sometimes," and ignored the messages, since they didn't seem to be hurting me. I had almost resigned myself to carrying these two undeletable folders with me until I die.

Then today I randomly stumbled across the solution.

I right-clicked one of the "stuck" folders and selected "Clear Offline Items", even though there were no offline items in the folder. (I deleted all the messages from it; the folder was empty. How do you clear something that is empty?) I got a warning dialog that said something like, "Hey, there's some unfinished synchronization here, do you want to clear the items anyway?" I said, "Go for it."

And then Outlook let me delete the folder.

My guess is that Outlook's synchronization engine got wedged up on these two folders because there was some unfinished business that it just couldn't reconcile, and it said, "Eh, maybe it'll work tomorrow, but in the meantime, don't delete it yet. I'm still working on it." Repeat for several months, because tomorrow never comes. By telling Outlook, "Oh just give up already, trust me, I don't care any more," the synchronization engine released its objections to deleting the folder and let me finally wipe it out.

If you have a mysteriously undeletable folder, you could try this, see if it helps.

Update: I just hit the problem again. The error message is

Outlook hat die Synchronisierung der lokalen Änderungen an Elementen in diesem Ordner noch nicht abgeschlossen. Der Order kann erst nach Abschluss der Synchronisierung mit dem Server gelöscht werden.

Yes, I run Outlook in German. This translates to "Outlook has not yet completed the synchronization of local changes to items in this folder. The folder can only be deleted after completion of the synchronization with the server."

This time, deleting the offline items wasn't good enough. Even though the Properties dialog says "Server folder contains: 0 items" and "Offline folder contains: 0 items", I nevertheless had to trigger a manual synchronization to reconfirm that zero equals zero before it would let me delete the folder.

(Watch, people are now going to start sending me Outlook product support questions. Hey, I don't work on Outlook. I'm a hapless victim like you!)

Comments (35)
  1. FlorianW says:

    I always thought, that a solution is just an error-report away.

  2. Sam says:

    you might be a victim like us, but you are a victim that fought back once, making yourself a hero :)

    ah well, and my question got nothing to do with support of course, I am just nosy: why do you run a german version of outlook?

  3. oldnewthing says:

    For the same reason I run the Swedish version of Windows.

  4. Andreas Haeber says:

    Some more curiosity about your choice of running German Outlook:

    Do you run other programs in different languages as well?

    Swedish Windows

    German Office (or have you got each of the Office programs installed in a different language?)

    Visual Studio in Norwegian maybe? :)

  5. German Outlook and Swedish Windows?

    Ok, now you’re just showing off!

    :)

    James

  6. Swe says:

    Jag kör också svensk Windows :)

  7. Andreas Kessler says:

    Maybe you get so many questions about unrelated Microsoft products because you’ve said so little about what you actually do. We know that you seem to know most things about Windows, but what is your actual position at Microsoft? The Windows team is quite large. What parts of Windows do you personally work on? UI? Kernel? Shell? Solitaire? Notepad? Is it Vista or is it products even further down the future?

  8. TestMonkey says:

    Raymond, I thought you might want to know: the layout of this article is messed up in 1024×768 on IE6. It looks like the bar at the right is interfering with the box containing the URLs in the article, and it ends up with a bunch of blank background colored space in the middle of the article.

    P.S. great blog.

  9. Mike Dunn says:

    I’m curious – can you enter bugs in Outlook’s database? Or can you call up their QA team and ask them for help? Or do you just have to hope that someone on Outlook reads your blog? ;)

  10. Mike says:

    Its good to know MS eats their own dogfood when it comes to outlook, too :)

  11. I’m wondering the same thing as Andreas: why do you run Outlook in German?

  12. bramster says:

    J. Daniel Smith. . .

    for the same reason that a dog licks his balls. . .

  13. Gene says:

    There was some sort of error message, but of course I didn’t read it

    You owe me a clean keyboard w/o Pepsi spewed all over it!

    This was the last place I expected to see that sort of thing. I wish more people were that honest.

    So can you devote an article on what you do at MSFT, besides being an invaluable guru?

    (are you leaving for Google soon? JUST kidding!!!)

  14. jon says:

    What are you syncing with? Maybe it’s something on "the other end" causing this?

  15. Tim says:

    Re: German and Swedish – I imagine that’s because Raymond is on the Explorer/Shell UI team (the last time I checked), so he’s trying to find/throw out i18n issues/edge cases by running unusual language combinations. A similar reason to why I always ran dual-monitor or multi-CDROM setups when developing Windows apps if I could. You get to be the grouchy guy who bitches about the app not working properly in odd situations, but you do find the bugs. (You wouldn’t believe how many apps still don’t deal with multi-mon properly – Outlook used to be a classic example in this case, but I believe it’s fixed now).

    Or maybe he’s learning/practicising German and Swedish, of course.

  16. Neal says:

    Hey Raymond, for your next assignment, figure out who is responsible for undeletable folders in XP like Program Files/MSN Gaming Zone, Program Files/NT/pinball, etc. Then put those folks on the spot, kick their butts for us, and finally tell us how to get rid of them (both the folders and the goofs who make them so). :-)

  17. Norman Diamond says:

    (Watch, people are now going to start sending

    > me Outlook product support questions.

    Well, some of us might just send Windows product support questions: How can we get Windows Explorer to work like Outlook? When we have a folder that can’t be deleted because of some error message that we didn’t read and it only had an OK button, where do we find the folder of synchronization errors? How do we clear offline items when we haven’t set anything for offline? What URL should we view in order to read useless further information? Now we know that Windows Explorer and Outlook are so much alike, and you solved the Outlook half, what about the other half?

  18. Vince P says:

    Ah, what would a thread be without a pithy comment from Norman

  19. TC says:

    Undeletable? :-)

  20. JamesW says:

    @Norman

    When I come across mysteriously locked files in Explorer I use either:

    o WhoLockMe http://www.dr-hoiby.com/WhoLockMe/index.php

    or

    o Process Explorer http://www.sysinternals.com/Utilities/ProcessExplorer.html

    I tend to prefer Process Explorer because it lets me delete the troublesome handle too. I prefer an OS that lets me delete open files even more.</pithy>

  21. Wang says:

    I prefer an OS that lets me delete a directory which is another apps current dir.

  22. oldnewthing says:

    Then you’ll love Windows 95.

  23. Nick Lamb says:

    Those are very different scenarios.

    When you delete an open file on Unix what you’re really doing, as the OS system call tells you, is unlink()ing the filename. The file still exists, but it’s anonymous. You can continue using the file, and if multiple processes have handles to the anonymous file they’ll see the same contents, subject to the usual buffer synchronisation rules. Somewhere a reference count is reduced, and when you finally close() the anonymous file for the last time, that refcount will reach zero and everything gets cleaned up.

    When you delete a directory on Unix that is the cwd for a running process all that happens is the directory goes away immediately. For normal application development this is a sufficiently rare and uninteresting case that it’s not worth worrying about. For security software you need to know that just because two processes have the same cwd doesn’t mean they’re in the same place (since it could have been deleted and a new directory created with the same name). In most cases code that made such an assumption already contained a dangerous race condition and so it needed to be changed anyway.

  24. Joe says:

    > I’m curious – can you enter bugs in Outlook’s database? Or can you call up their

    QA team and ask them for help?

    I work for Microsoft on some (unrelated) product, and I manged to open bugs for Windows (IE actually), SQL and VC++ (the C++ compiler optimized away some of my code!). If it’s important enough for you, you can also find the people in charge of a certain product/feature and talk (by email), but their responsiveness and willingness to help will depends on the kind of pressure they’re under, how nice they are, etc…

  25. Jens says:

    With regards to backwards compatibility and locked files, I seems to remember that in NT 3.51 you could do ALT-ENTER on a file in the filemanager and it would show all processes that have a lock on it.

    Does this functionality still exist somewhere in XP, and if not how come MS ditched this functionality ?

  26. oldnewthing says:

    I can’t find any reference to Alt+Enter or to locked files in the File Manager source code. It may have come from a thirdparty extension.

  27. J Rupert T Beear. says:

    My first experience of Solaris was trying to install some software. It needed an upgrade of libc. I copied the file, but it was the wrong version. Most apps were dynamically linked to libc.so, and would die with the new version so the whole machine was completely crippled. Took ages to find a command which would let me copy the corrected libc from another machine but was statically linked.

    Mind you, I guess Windows will get some way to replace a locked file at some point, just so security updates can be completed without a reboot.

    As to the German Outlook on Swedish Windows thing, the odd thing is that most of the PCs I used in Germany and Sweden tended to run the US-English version of Windows 2000 but with the multi language UI pack. Even then, most people run them with English menus because they were used to it.

  28. Norman Diamond says:

    Tuesday, October 18, 2005 4:49 AM by JamesW

    > When I come across mysteriously locked files

    > in Explorer I use either:

    > o WhoLockMe

    > http://www.dr-hoiby.com/WhoLockMe/index.php

    I’ve used it several times. Usually it cites an explorer.exe process. Usually Windows Task Manager shows two executing instances of explorer.exe, and usually Windows Task Manager is unable to kill the process which holds the lock. No error message, but the process just continues doing nothing visible and holding the lock. Windows Task Manager is able to kill the other explorer.exe process, thereby causing other nuisances but doing nothing useful.

    Sometimes WhoLockMe just exits without showing any culprits.

    > o Process Explorer

    > http://www.sysinternals.com/Utilities/ProcessExplorer.html

    Yeah I’m negligent there, having only installed that on one PC. I do need to use it more.

    > I tend to prefer Process Explorer because it

    > lets me delete the troublesome handle too.

    Does it inject code into the troublesome process to force it to close the troublesome handle? I wonder what happens when the process continues its normal operation without knowing that the handle’s been closed.

  29. John Elliott says:

    What Jens may be thinking of is this: In the NT 3.51 file manager, you can bring up the properties of a file (with ALT+RETURN, or File|Properties) and there’s an "Open by" button. It doesn’t show processes, though.

  30. JamesW says:

    > I tend to prefer Process Explorer because it

    >> lets me delete the troublesome handle too.

    >Does it inject code into the troublesome process

    >to force it to close the troublesome handle? I

    >wonder what happens when the process continues

    >its normal operation without knowing that the

    >handle’s been closed.

    I don’t know how it closes the handle but it does give a suitably dire warning of potential Bad Things happening as a result. Still, it beats closing random apps looking for the cause of the problem.

  31. Jens says:

    John Elliott,

    It’s been a long time since I’ve used NT 3.51 so my memory is a bit misty, but it must be that. Did it show Users instead of processes then ?

    I stil wonder what happened to that functionality.

  32. Richard says:

    Process Explorer does all its magic via a driver it dynamically loads on startup.

    If you open the DLL view of the system pesudo process you can see a listing of all loaded drivers, amongst these is PROCEXP90.SYS.

  33. KyleF says:

    >Does it inject code into the troublesome process

    >to force it to close the troublesome handle? I

    >wonder what happens when the process continues

    >its normal operation without knowing that the

    >handle’s been closed.

    No code injection is necessary. Process Explorer installs at runtime a (kernel-mode) driver that performs all of its necessary privileged instructions, such as closing a handle owned by any process in the OS. Installing this driver is the primary reason why Process Explorer requires administrative privileges to run.

    Just FYI, closing a handle out from underneath an application is usually a very bad idea unless you know EXACTLY what that program does with the handle. Just *searching* for the open handle is usually enough. But if the offending process is a container app (like Explorer.exe) then hunting down the offending thread and/or loaded module will give a better idea as to the underlying culprit.

  34. Stop trying to synchronize it.

Comments are closed.