Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install

Folders4Gmail

You love Gmail, but you miss folders to sort your emails? Organize your labels in a folder-like hierarchy with the Folders4Gmail userscript.

Suppose you have two labels:
Mum
Dad

And you want Mum and Dad to be sub-labels of Family.

All you have to do is:

  1. Rename your labels
    Dad to Family/Dad
    Mum to Family/Mum
    (use Edit labels and rename).

Example before

Folders4Gmail will now automatically arrange your labels in a folder-like collapsable hierarchy.
Example after

 


Written 2007 by Arend v. Reinersdorff
Your feedback is welcome arend@reinersdorff.de


New in Version 1.36, 17. April 2007
Fix for a minor code change in Gmail.





Jul 22, 2008
alex dante User

Awesome userscript, which I've been using through the Better Gmail2 extension.

However, I noticed today that FF3 (under Ubuntu 8.04) was sitting at 35% CPU usage with Gmail open. By disabling everything I isolated it to the Better Gmail2 extension, then enabled each included script one at a time to discover that the source of the increased CPU consumption was Folders4Gmail. I disabled the BG2 extension again and installed F4G directly within Greasemonkey, and the problem persisted.

It seems to -only- happen if there are no labels defined, which happened to be the case as I'd just been assigned a new work email account on Gmail. Is anyone else experiencing this? I know it's a pretty unique edge case but should there be some kind of check around the existence of labels?

Cheers!

 
Jun 27, 2008
diego.devita Scriptwright

this was a wonderful and useful idea. It's the most important mod I have for gmail. And I got so addicted that I built my entire labeling strategy around this. So to help me handle this strategy I crafted a script to enlarge the labels panel, if someone thinks it could help as well this is the link http://userscripts.org/scripts/show/26069
hope you enjoy.

 
Jun 15, 2008
mod_wastrel User

This is possibly my most useful mod for Gmail (and Gmail IMAP with Thunderbird), certainly with regard to saving screen space, so: Thanks!

Feature request: is it possible to display an unread count in the title of the Labels box when it's collapsed entirely?

 
Jun 12, 2008
Gin User

I love this script! Can you add a feature to organize Contacts into folders, too? Please??

 
Jun 11, 2008
leonchen User

Excellent scripts, exactly do what I want. Just one suggestion, could you add to one link below the the link "Edit lables", so that can collapse all or uncollapse all folders.

 
Jun 6, 2008
danrourke User

I can't get this to work in Gmail 2... I have tried changing language from UK to US. I have made sure I have most up to date version. Nothing seems to get it to work. If I want folders I have to revert back to old Gmail.
Any ideas?

 
May 5, 2008
Sean Bannister User

This should so be a feature in gmail.

 
May 3, 2008
georgie Scriptwright

The previous version of this script allowed you to order your folder using e.g. 'a/ontop' and 'x/attheback', but this doens't seem to work anymore in the new version. Would it be possible to reintroduce that functionality?

 
Apr 29, 2008
Kevin Shea User

Excellent. Thanks for this!

 
Apr 22, 2008
Stu User

@Arand: I forgot I had modified the script to use "." as separators and when I upgraded of course my modification was gone. Sorry for the hassle. Working great now :)

 
Apr 22, 2008
Stu User

@Arand, any idea why it is not working for me? Is there a way to debug this? I have many labels and without this plugin using gmail for my work is not nearly as convenient as before.

I know I'm using the right version because I see the the comment in the code about April 17th. I'm just asking if there is a way to debug this because I can't figure it out myself.

Thanks

 
Apr 21, 2008
keir User

I found going back to version 1.35 of this script got it working again in opera. Strange stuff.

 
Apr 20, 2008
keir User

Hi all, I'm still having trouble getting it to work using Opera 9.27
Is it just me or is it broken for Opera?
cheers

 
Apr 19, 2008
Arend Script's author

@Sergut
The code in Folders4Gmail is now frames[3] instead of frames[2]. It seems Gmail added an iframe.

Unfortunately, this small change was enough to break the script. :-(

Also, there's a small change because labels are now real links.

 
Apr 18, 2008
Stu User

Hmm, the fix isn't working for me. I've tried installing it a few times, I'm using the new version since I see the April 17th comments in the source. I've disabled Better Gmail 2 in case its older folders4gmail was causing issues. Am I the only one who can't get it to work?

 
Apr 18, 2008
Sergut User

I meant: 'If you could explain what changed, I think some of us would appreciate it'. Sorry. There should a 'preview' button somewhere. O:-)

 
Apr 18, 2008
Sergut User

Thank you very much for the quick fix. Good work.

If you could explain what change, I think some of use would appreciate it (I would, at least). :-)

 
Apr 17, 2008
dogeter User

Not even 12 hrs down! Good work!

 
Apr 17, 2008
Arthaey Angosii Scriptwright

Thanks for the quick fix! The script is working for me again.

 
Apr 17, 2008
NolanTarantino User

Confirmed. No longer working.

 
Apr 17, 2008
HockeyPhool User

No joy for me as-of today

 
Apr 17, 2008
Spencer Gibb User

ditto for me, as of Apr 17 Folders4Gmail stopped working

 
Apr 17, 2008
dogeter User

Not working for me either as of this morning.

 
Apr 17, 2008
Chris Bartlett User

Hello. I have to second Sergut... Everything has been working perfectly since I installed it, but I just opened GMail this morning and it no longer works. Something going on???

 
Apr 17, 2008
Sergut User

It looks like Folders4Gmail does not work as of Apr 17th. Have Gmail people made changes to their code?

You could comment on this script if you were logged in.