Save a search as a folder
A search in Mbox Viewer can become a virtual folder in two clicks. Run the search, click Save to folder above the results and choose a folder or New folder…. The app adds every result to the folder. One search can add up to 500,000 messages, and the new folder remembers the query that created it. The folder is a fixed list of messages, and later matches are not added on their own.
How do I save a search to a new folder?
- Type a query such as
from:oliviain the search bar and wait for the results. - Click Save to folder at the top of the list, next to Sort by. The button shows a folder icon and a small arrow.
- Choose New folder… at the bottom of the menu.
- Check the name the app proposes in the Name field and click Create.
The New folder dialog states how many messages it will add. For two results it says "All 2 results of “from:olivia” will be added to it." When the folder is ready, the app confirms with "Search results saved to “from:olivia”".
The proposed name is the query itself, without quotation marks. When the query is a single
label:, tag: or folder: term, the app proposes the value instead, so label:"Recruiting"
becomes "Recruiting".
How do I add a search to an existing folder?
Run the search, click Save to folder and pick the folder by name in the menu. The menu lists every folder of the mailbox in alphabetical order. Messages already in the folder are not added twice.
Adding a search to an existing folder does not change the query stored with that folder. The folder keeps the query it was created with.
Does the folder update itself?
No. A virtual folder is a list of messages and does not behave like a saved query. New messages that match the query later, for example after you open a newer export of the same mailbox, are not added on their own.
To bring a folder created from a search up to date, right-click it in the sidebar and choose Run the original search again. Then save the results to the same folder. You can also add and remove messages by hand in any of the virtual folders.
What are the limits?
| Item | Limit |
|---|---|
| Messages added by one search | 500,000 |
| Folder name length | 60 characters |
| Folder names | unique per mailbox, case ignored |
| Characters refused in a name | quotation marks and control characters |
When a search returns more than 500,000 messages, the app shows the error
"Too many results (612,000) for a folder (max 500,000)" with the real count and adds nothing.
Split the query, for example by year with after: and before:, and save each part to the same
folder.
How do I open a saved folder?
Click the folder under Folders in the sidebar. The search bar shows folder:"Name", and the
list shows the messages of the folder. You can add operators after it to search inside the
folder.
| Query | Shows |
|---|---|
folder:Trips |
the messages of the folder Trips |
folder:Trips has:attachment |
the messages of Trips that have attachments |
-folder:Trips |
the messages that are not in Trips |
folder:Trips tag:"To review" |
the messages of Trips that carry the tag To review |
A folder name with a space needs quotation marks. Type folder:"Tax 2025" for a folder named
Tax 2025. When you rename a
folder, the app also rewrites the stored folder queries that mention its old name.
Where are saved folders stored?
Folders and tags are stored outside the mbox file and outside the index. They live in the
annotations folder of the app data.
| System | Location |
|---|---|
| macOS | ~/Library/Application Support/com.mboxviewer.viewer/annotations/ |
| Windows | %LOCALAPPDATA%\com.mboxviewer.viewer\annotations\ |
Each message is identified by its Message-ID header, or by a fingerprint of its content when it
has none, so folders survive a reindex of the file.
Back up the annotations folder if your folders matter to you, because the app cannot rebuild
them from the mbox file.
Frequently asked questions
How do I save a search in Mbox Viewer?
Run the search, click Save to folder above the list and pick a folder or New folder…. Every result is added to the folder, including the ones you have not scrolled to yet.
Does the folder update when new messages match the query?
No. The folder holds the messages that matched when you saved it. To add new matches, run the search again and save it to the same folder, and the messages already there are not added twice.
How many messages can a search add to a folder?
A search can add up to 500,000 messages at a time. Above that, the app shows "Too many results" with the count and adds nothing, so narrow the query and save it in several parts.
Why do I not see the Save to folder button?
The button appears only when a search is active, has finished and returned at least one result. An empty search bar lists every message and shows no button.
Can I run the original search of a folder again?
Yes, for a folder created from a search. Right-click the folder in the sidebar and choose Run the original search again. The list then shows the current results of the query that created the folder.
Does saving a search change my mbox file?
No. The app stores folders in annotations/<mailbox id>.json, which is a separate file in its data folder. The mbox file is opened read-only and never modified.
Can one message be in several folders?
Yes. A message can belong to as many folders as you like. Saving a search to a second folder leaves the first one unchanged.
How do I show the messages of a saved folder?
Click the folder under Folders in the sidebar. The search bar then shows folder:"Name", and you can add other operators to it. The query folder:Trips has:attachment lists the messages of Trips that have attachments.
Can I save a search that uses tags or other folders?
Yes. A query with tag: or folder: is saved like any other. folder:Invoices -tag:paid saves the invoices that do not carry the tag "paid" yet.