Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I was searching around but found no answers about this issue: I have a folder, in my Gmail account, where I automatically (with filters) put mail with attachments and other characteristics... they are basically emails that could be deleted.

I periodically delete all emails form such folder.

However, some of them, which have also additional labels, are useful to me and I don't want to delete.

Is there a way of deleting all emails from a folder except the ones which also belong to other folders?

Another way of considering the question: is there a way to delete all messages marked with a certain label only and not with other labels?

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

You won't be able to do it with a filter, because those act when the message comes in. However, it's simple to do with a search.

label:first -label:second

That search string will return all conversations with the label first and do not have the label second. The minus sign (- or hyphen, if you prefer) means negation.

More information about search operators is available at Advanced search.

If you want to exclude more labels, simply add them to your search string:

label:first -label:second -label:third
share|improve this answer
    
Many thanks, it partially fix the problem but it can work. The more comprehensive solutions would be to find a way to exclude 'all other labels' without having to specify them all. In my case I have many labels and writing -label:second -label:third ...-thirteenth.. would be a bit annoyng –  Daniele B Nov 27 '13 at 10:53
    
Yes, unfortunately that's just how it works right now. –  Al E. Nov 27 '13 at 16:30
add comment

Gmail does not use folders. It uses Labels, which looks like folders, but are totally different & better. Labels are more like tags.

A single email can have multiple labels, but that does not mean the email is copied multiple times in all these folders. It just means the same single email has two or more different tags & can be accessed by any one of the tag/label.

So for example if your setup is:

message01, message02 has labels Important & Delete
message03 has label only Delete

In Left-hand folder/label list, when you click Delete, Mess01, 02, 03 will appear. Select them all, and remove the label Delete.

Mess 01 & 02 will still have label Important.

Then go to All Mail, and select All the messages with No label. Which would be only Message 03. Delete It.

share|improve this answer
    
thanks for the answer, but it can't work: I've tons of other non-labeled messages in my "all mail" –  Daniele B Sep 23 '13 at 13:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.