---
name: "fnext"
section: "1mh"
platform: "linux"
package: "nmh"
version: "1.8-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/new/1mh"
---

# fnext(1mh)

report on nmh folders with new messages fnext - set current nmh folder to next folder with new messages fprev - set current nmh folder to previous folder with new messages unseen - scan any new messages in all nmh folders

Part of [new(1mh)](/new/1mh.md).

## NAME

new - report on nmh folders with new messages\
 fnext - set current nmh folder to next folder with new messages\
 fprev - set current nmh folder to previous folder with new messages\
 unseen - scan any new messages in all nmh folders

## SYNOPSIS

**new** \[**-help**\] \[**-version**\] \[*sequences*\] \[**-mode** *mode*\] \[**-folders** *foldersfile*\]

**fnext** is equivalent to **new -mode fnext**

**fprev** is equivalent to **new -mode fprev**

**unseen** is equivalent to **new -mode unseen**

## DESCRIPTION

**new**, in its default mode, produces a one-line-per-folder listing of all folders which contain messages in the specified *sequences*, or in the sequence(s) listed in the profile entry “*Unseen-Sequence*”. Each line consists of the folder name, the total number of messages in the specified sequences, and a list of messages derived from the .mh\_sequence file.  For example:

```
foo     11.* 40-50
bar    380.  760-772 824-828
 total    391.
```

The \`\*' on foo indicates that it is the current folder.  The last line shows the total number of messages in the desired sequences.

**new** crawls the folder hierarchy recursively to find all folders, and prints them in lexicographic order.  Override this behavior by providing a *foldersfile* containing the pre-sorted list of folders which **new** should check, one per line.

In **fnext** and **fprev** modes, **new** changes to the next or previous matching folder, respectively.

In **unseen** mode, **new** executes **scan** *sequences* for each matching folder.

## FILES

- $HOME/.mh\_profile

  The user profile

## PROFILE COMPONENTS

- Path:

  To determine the user's nmh directory.

- Current-Folder:

  To find the default current folder.

- Unseen-Sequence:

  The name of the unseen message sequence.

## SEE ALSO

[*scan*(1)](/scan/1.md), [*mh-format*(5)](/mh-format/5.md)
