[SOLVED] How can I delete an undeletable folder ?
Hi. I have created 2 subfolders in "Drafts", which ALSO turned into draft folders:
- The folder icons switched from the standard folder icon to the "Drafts" icon.
- The right-click context menu is reduced (just like for other special folders), e.g. the "delete" command is missing.
So how can I delete this misbehaving folder now ?
I doublechecked in my account manager and via config editor that the subfolder are NOT used as DRAFTS folder for any of my (POP3/maildir) accounts.
Thank you so much.
Ezalaki modifié
Solution eye eponami
welcome said
@wsmwk: Thank you. Where is the folder type information stored? In "folder.msf" ? I assume it's difficult to manually edit the file, because it's Mork ?
The problem is this - it's one of those things that is just not obvious - I know where many things are located but this one had me stumped.
Viewing the index file is simple enough you just use a text editor, but that just contains info regarding what is contained in the mbox file. The flag is set against the folder not specific emails. I though it might be in the folderCache.json file.
Although it mentions 'flags' - I would not feel confident about editing anything because you would really need to know what each specific number actually represents.
Pop seem different from imap and also smart mailboxes
Pop: "flags" : 28, seems to be applied to an actual mail account name folder "flags" : 16388, has folder name 'Archives' "flags" : 1028, has folder name 'Drafts' "flags" : 4100, has folder name 'Inbox' "flags" : 1073741828, has folder name 'Junk' "flags" : 516, has folder name 'Sent' "flags" : 4194308, has folder name 'Templates' "flags" : 260, has folder name 'Deleted' (usually seen as 'Trash' in Folder Pane) "flags" : 4, - seems to be applied for a folder I created - so ordinary folder.
smart mailboxes: (Unified Folders) "flags" : 28, has folderName : "Unified Folders", "flags" : 16420, has folderName : "Archives", "flags" : 1060, has folderName : "Drafts", "flags" : 4132, has folderName : "Inbox", "flags" : 1073741860, has folderName : "Junk", "flags" : 548, has folderName : "Sent", "flags" : 4194340, has folderName : "Templates", "flags" : 292, folderName : "Deleted", (usually seen as 'Trash' in Folder Pane) "flags" : 4, - seems to be applied for a folder I created - so ordinary folder.
Imap:
"flags" : 0, for imap mail account folder name
"flags" : 671621396, set for a default gmail bin/trash folder
"flags" : 134751252, set for default gmail folder name 'Drafts'
"flags" : 134754324, set for default gmail folder name 'Inbox'
"flags" : 134750228, set for a subfolder of Inbox which I created.
"flags" : 134750212, set for a subfolder of Inbox which I created.
"flags" : 134750228, set for a folder I created
"flags" : 134766612, set for a folder I created
"flags" : 671621140, set for a folder I created
"flags" : 671621652, set for default gmail folder name 'Sent Mail'
"flags" : 1745362948, set for default gmail folder name 'Spam'
"flags" : 4194308, set for default gmail folder name 'Templates'
"flags" : 151527444, seems to be set for a 'noSelect' folder I created
I deliberately set the pop Inbox to have both Inbox and Drafts flag
Then after restart, rechecked to see what flag had been set for Inbox.msf
Previously:
"flags" : 1028, has folder name 'Drafts'
"flags" : 4100, has folder name 'Inbox'
After setting additional 'Drafts flag on 'Inbox' "flags" : 5124, has folderName : "Inbox",
Did the same for imap account Previously "flags" : 134751252, set for default gmail folder name 'Drafts' "flags" : 134754324, set for default gmail folder name 'Inbox'
After setting additional 'Drafts flag on 'Inbox' "flags" : 134755348 for default Inbox
After removing the incorrect 'Drafts' and leaving just 'Inbox', restaring Thunderbird, check folderCache.json and the Inbox 'flag' numbers have reverted to original setting.
These are my findings, but it would be interesting to know what other people see. I'm not suggesting any editing of the folderCache.json file at this point because this is just my observations - if you wish to try then please make a backup of the original before you edit anything.
Tanga eyano oyo ndenge esengeli 👍 1All Replies (12)
any ideas ?
Install https://addons.thunderbird.net/en-US/thunderbird/addon/folderflags/ Remove the draft flag from the affected folder. Then you should be able to delete the folder.
Wayne is correct - it looks like folders B and E have a folder flag set up as 'Drafts'
Once you have installed folderFlags addon You right clickon eg: E folder and select 'Properties' Then uncheck the 'Drafts' option. click on 'OK'
I've provided an image as a guide. In the example I'm talking about the Inbox, but same process applies to any folder. In your case you do not want any of those options selected.
If you need more info on installing the addon pease let us know.
Thank you both. Can I manually edit the affected file(s) in the profile folder to solve the problem as well ?
(I am trying to use as few add-ons as possible due to potential uncaught side-effects (the more, the merrier :). But if there is no other solution, I will use the suggested add-on.)
> Can I manually edit
I know of no way to do that.
@wsmwk: Thank you. Where is the folder type information stored? In "folder.msf" ? I assume it's difficult to manually edit the file, because it's Mork ?
Solution eye oponami
welcome said
@wsmwk: Thank you. Where is the folder type information stored? In "folder.msf" ? I assume it's difficult to manually edit the file, because it's Mork ?
The problem is this - it's one of those things that is just not obvious - I know where many things are located but this one had me stumped.
Viewing the index file is simple enough you just use a text editor, but that just contains info regarding what is contained in the mbox file. The flag is set against the folder not specific emails. I though it might be in the folderCache.json file.
Although it mentions 'flags' - I would not feel confident about editing anything because you would really need to know what each specific number actually represents.
Pop seem different from imap and also smart mailboxes
Pop: "flags" : 28, seems to be applied to an actual mail account name folder "flags" : 16388, has folder name 'Archives' "flags" : 1028, has folder name 'Drafts' "flags" : 4100, has folder name 'Inbox' "flags" : 1073741828, has folder name 'Junk' "flags" : 516, has folder name 'Sent' "flags" : 4194308, has folder name 'Templates' "flags" : 260, has folder name 'Deleted' (usually seen as 'Trash' in Folder Pane) "flags" : 4, - seems to be applied for a folder I created - so ordinary folder.
smart mailboxes: (Unified Folders) "flags" : 28, has folderName : "Unified Folders", "flags" : 16420, has folderName : "Archives", "flags" : 1060, has folderName : "Drafts", "flags" : 4132, has folderName : "Inbox", "flags" : 1073741860, has folderName : "Junk", "flags" : 548, has folderName : "Sent", "flags" : 4194340, has folderName : "Templates", "flags" : 292, folderName : "Deleted", (usually seen as 'Trash' in Folder Pane) "flags" : 4, - seems to be applied for a folder I created - so ordinary folder.
Imap:
"flags" : 0, for imap mail account folder name
"flags" : 671621396, set for a default gmail bin/trash folder
"flags" : 134751252, set for default gmail folder name 'Drafts'
"flags" : 134754324, set for default gmail folder name 'Inbox'
"flags" : 134750228, set for a subfolder of Inbox which I created.
"flags" : 134750212, set for a subfolder of Inbox which I created.
"flags" : 134750228, set for a folder I created
"flags" : 134766612, set for a folder I created
"flags" : 671621140, set for a folder I created
"flags" : 671621652, set for default gmail folder name 'Sent Mail'
"flags" : 1745362948, set for default gmail folder name 'Spam'
"flags" : 4194308, set for default gmail folder name 'Templates'
"flags" : 151527444, seems to be set for a 'noSelect' folder I created
I deliberately set the pop Inbox to have both Inbox and Drafts flag
Then after restart, rechecked to see what flag had been set for Inbox.msf
Previously:
"flags" : 1028, has folder name 'Drafts'
"flags" : 4100, has folder name 'Inbox'
After setting additional 'Drafts flag on 'Inbox' "flags" : 5124, has folderName : "Inbox",
Did the same for imap account Previously "flags" : 134751252, set for default gmail folder name 'Drafts' "flags" : 134754324, set for default gmail folder name 'Inbox'
After setting additional 'Drafts flag on 'Inbox' "flags" : 134755348 for default Inbox
After removing the incorrect 'Drafts' and leaving just 'Inbox', restaring Thunderbird, check folderCache.json and the Inbox 'flag' numbers have reverted to original setting.
These are my findings, but it would be interesting to know what other people see. I'm not suggesting any editing of the folderCache.json file at this point because this is just my observations - if you wish to try then please make a backup of the original before you edit anything.
I don't advocate nor advise people hacking files by direct editing, nor will I provide this information. Standard tools should be used where possible. https://addons.thunderbird.net/en-US/thunderbird/addon/folderflags/ is one such tool
Ezalaki modifié
Wayne Mery said
I don't advocate nor advise people hacking files by direct editing, nor will I provide this information. Standard tools should be used where possible. https://addons.thunderbird.net/en-US/thunderbird/addon/folderflags/ is one such tool
I'm in agreement with you, as I said " I'm not suggesting any editing of the folderCache.json file" because you have to know what you are doing.
I have always advised people in the Thunderbird Support Forum to use the addon 'folderFlags' because it is the easiest and safest method to check and fix flags set on folders.
In a bugzilla post this was advised....folderCache.json should not be removed, since it will cause TB to visit all folders in the system which can be problematic for large profiles with many folders. You can edit the JSON file in an editor correcting or removing incorrect entries.
Hence, it is better to have a good understanding of the contents of the 'folderCache.json' file and that is normally obtained by sharing information by willing users.
As the person who posted the question enquired about which file and what data would need to be edited if the user did not want to use an addon, it's necessary to have a better understanding what the 'flags' means and whether the information I see is also seen by others. But if anyone does not want to participate then that's ok. I'm not demanding information just asking for others to volunteer information.
@Toad-Hall : I completely agree with you. Thanks for looking into this. If we can find an obvious method to manually edit the affected file(s), I'd have more trust in this for this specific task than in an add-on, which may have bugs just as Thunderbird itself obviously has a bug which causes this specific behaviour.
@Toad-Hall : Worked like a charm! The stubbornly undeletable draft folders indeed had flag 1028 which I changed to flag 4. The folders are now deletable, problem solved. Thank you so much!
And sorry for not having found this obvious solution myself, I should have looked more closely into the files.
To clarify - not disagreeing with Toad-Hall. My comment about not editing files was directed at the reporter, and to any user who is tempted to edit files. This is normally a bad idea in any part of Thunderbird, not just folder files - too many users shoot themselves in the foot by doing such things and then ask for assistance to resolve their now worse problem.
https://addons.thunderbird.net/en-US/thunderbird/addon/folderflags/ is maintained by a reputable developer who definitely knows what they are doing. I can personally confirm that it has worked over many years and never caused any problems.
In the distant past it was possible for add-ons to break Thunderbird, but this is much less likely to happen in recent years - we have a robust add-on review process, and a full time developer dedicated to providing the code infrastructure for add-ons, and assisting authors in proper techniques. If anyone has had problems with an add-on breaking Thunderbird in the last year or two that might be worth filing a bug report.
Ezalaki modifié