This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How can I delete a folder which has subfolders?

  • 13 replies
  • 5 have this problem
  • 1 view
  • Last reply by Matt

more options

I have not been able to delete folders with sub-folders, it seems only must delete each sub. . sub and sub folders individually. This is a very laborious process!

I have not been able to delete folders with sub-folders, it seems only must delete each sub. . sub and sub folders individually. This is a very laborious process!

All Replies (13)

more options

You could locate your profile, close Thunderbird, and delete the offending folders using your OS's file manager.

Be careful. Backup first. Browse your profile to become familiar with its structure and naming conventions before doing anything rash.

https://support.mozilla.org/en-US/kb/profiles-tb

more options

Hi JHald,

I have tried to reproduce, by creating a folder 'aa' under my local folders, then create a folder 'bb' under 'aa'.

When rightclicking 'aa' I can choose Delete. It will then delete 'aa' as well as 'bb'.

What are you doing differently? And, another question, can you reproduce this under Local folders? In that case it might be related to the mail server instead of Thunderbird itself.

more options

Sander, good point.

I was tidying up a gmail account where I had created nested folders for test purposes (.../test1/test2/test3/) and I wasn't allowed to delete test1 until it was empty, and I couldn't delete test2 until test3 had gone.

Repeating this test in Local Folders, they all vanished in one go with no difficulty. So maybe it is server-related.

more options

Zenos, this is because Gmail considers your folder names as labels. For labels, it doesn't make sense to delete a 'tree' of them. So indeed it's server related.

In case you do not need further assistance could you please mark this as answered? Thank you!

more options

OK, notes on all the above recommendations:

1) Closed TB and was able to delete main folder and all subfolders at main folder level.

2) In TB I created a new folder with 2 more levels of folders underneath it. Was not able to delete the lower levels from the main level folder.

3) I'm not sure if any of the email account servers could affect these folders I am working with as none of the accounts are linked to the folders at this point, I am just trying to get set up and import existing Windows Mail files and then recovered emails, only then will I set accounts to put new emails in the folders. Also, there are no emails in these folders at all, unless there is some residue from the corrupted Windows Mail, which is not visible in TB.

So, a question, could the fact that these folders had contained corrupted emails (un-readable) when in Windows Mail be causing a problem? However, the test folders I created in (2) above acted the same way.

more options

It is something unique to you, I can delete a tree of folders, just like the other poster. As long as the folders live in the local folders hierarchy.

From this and other thread you have going, I really think part of the issue is the way your trying to do things.

IIRC you have the import export tolls add-on which will import files from a whole tree of folders and make new folders as it goes, so why are you manually creating folders.

more options

Nah. This is about importing from Windows mail. We don't need to get into labels vs folders.  :-)

Modified by Zenos

more options

I have tried the ImportExport tool many times, in various ways. After a few attempts where it only imported some of the folders, I was able to get the entire list of main folders, and first level sub-folders, but not second level sub-folders. . . this is why I have attempted various manual methods.

If you have looked at my other pending question you will see importing em,ails is also not working. I tried using the ImportExport tool for them as well, but did not get full functionality with them . . . now they have disappeared from my attempt to move them, without my deleting them.

Basically TB seems to bog down with anything I do, or whatever it is doing, as there is no indication it is doing anything. I have left it alone for hours after importing or moving files, and nothing.

At this point quite disappointed, with dozens of hours invested.

Modified by JHald

more options

It is not my job to chase your questions around, explain yourself, in one place and you might get an answer you like. From what I gather your trying to import corrupt files into Thunderbird. It is not going to work, the corrupt files must be removed for any process on EML files to work.

more options

Hmm, not sure how I upset you, unless I have not properly conformed to the "box" which I must fit into here. I have only 2 questions in Mozilla support, and don't recall ever asking one before, so not sure what all the chasing is about. My other question which you refer to has not had any viable answers to this point. I appreciate that this forum is all volunteer based effort, I am grateful for this, but not sure why I get an attitude rather than productive input? I thought this question was separate, but I do see how they may relate.

Anyway, to the question here. . . This question pertains to folder I had imported into Thunderbird, and were not functioning as I thought they should. Now if this relates to my Windows Mail haven been corrupted, that is helpful information. I tested with new folder I added manually into TB and had the same result, could not delete multiple levels of sub folders. So, could the fact that I imported the previously corrupted WMail folders somehow damaged or is restricting the normal TB functionality?

PS, As far as I know the corrupted stuff has been cleaned up from running multiple cleanup programs, but I don't know how else to check this. Is there a way for me to check this.

more options
If you have looked at my other pending question you will see importing em,ails is also not working.

Enough said. It pressed my buttons... sorry about that.

The issue is all the well meaning people here are trying to duplicate what your saying happens and can not. They can all delete locally stored folders regardless of their size of sub folders.

I have seen occasions where people have used extreme folder conventions in outlook express that in total exceed about 200 characters in depth.

These will never import to Thunderbird as the file system limits the total depth of a folder tree to 256 characters and the C:\users\[USERNAME]\appdata\Thunderbird\profiles\34518769.default\mail\local folders\ part of the path takes up the first 50 or so. I have no idea if other mail programs allow a folder name that long, or if it is only outlook express.

There can also be issues with folder names that contain non US ASCII characters accents umlauts etc There are always open bugs in bugzilla for different issues in that regard. Basically Thunderbird was written by Netscape in US English and it is only with significant developer effort it is moving away for that. Just when they think they are there a new issue pops up. The last one I read was about email addresses with umlauts.

That is all generalities however. I suggest you post a screen shot of the file system showing the folders in question opened in a tree. The picture might jog someones memory or open another line is inquiry.

Modified by Matt

more options

Checked some folder tree depths as you mentioned, they look to be about half of the 256 char. max you noted above.

Some interesting things I have noticed . . .

All 3 levels of folders I have imported are shown in Windows Explorer files under Thunderbird/Profiles/user.default/Mail/Local Folders, but in the Thunderbird program window only 2 levels show, and I am not able to use ImportExport Tool to bring them in to view.

When I manually add a 3rd level folder in Thunderbird program window it is accepted, but when I delete it, then upon close and re-opening of program, the folder is back, yet the deleted folder is still in the Trash. And in the Windows Explorer files it does not show at the reappearing location but is in Trash.

I hope you can follow those. It seems the Windows Explorer folders and those visible in the Thunderbird program are not appearing the same.

There are Error Messages in the Error Console, I do not know enough to know exactly what they are about:

Timestamp: 5/12/2014 11:09:19 PM Error: NS_ERROR_FILE_ACCESS_DENIED: Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIMsgFolder.updateFolder] Source File: resource://gre/modules/dbViewWrapper.js Line: 93

Timestamp: 5/12/2014 11:09:19 PM Error: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIMsgFolder.updateFolder]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: resource://gre/modules/dbViewWrapper.js :: FolderNotificationHelper_notifyOnLoad :: line 93" data: no] Source File: resource:///modules/errUtils.js Line: 96

Timestamp: 5/12/2014 11:09:19 PM Error: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIMsgFolder.updateFolder]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: resource://gre/modules/dbViewWrapper.js :: FolderNotificationHelper_notifyOnLoad :: line 93" data: no] Source File: resource:///modules/errUtils.js Line: 35

While creating services from category 'profile-after-change', could not create service for entry 'Disk Space Watcher Service', contract ID '@mozilla.org/toolkit/disk-space-watcher;1'

Could not read chrome manifest 'file:///C:/Program%20Files%20(x86)/Mozilla%20Thunderbird/extensions/%7B972ce4c6-7e08-4474-a285-3208198ce6fd%7D/chrome.manifest'.

Could not read chrome manifest 'file:///C:/Program%20Files%20(x86)/Mozilla%20Thunderbird/chrome.manifest'.

Any new ideas from this?

more options

Close Thunderbird

go here Thunderbird/Profiles/user.default/ in explorer

Delete foldertree.json and panacea.dat.

Restart Thunderbird