Removing Folders: rmf

[previous] [next] [table of contents] [index]

The rmf command removes a folder and all the messages in it. If you don't give a folder name, the current folder is removed.

CAUTION: If rmf can't find the current folder, for some reason, the folder to be removed defaults to inbox. If you have an Inbox: MH profile entry (MH 6.8 and above), rmf will default to that folder instead.

In the following cases, rmf removes a folder and all messages and does not ask for confirmation:

At other times, rmf is supposed to ask for confirmation before it removes a folder.

CAUTION: When you use the rmf command, the folder, and the messages in it, are completely removed -- you can't get them back.

rmf does not use the rmmproc:, if any, in your MH profile. Be careful.

I recommend that you put this entry in your MH profile:

rmf: -interactive
That should help to ensure that rmf always shows you the folder name and asks for confirmation before deleting it. (You should spell -interactive correctly; it doesn't have the spelling bug mentioned above.)

After you remove a top-level folder, rmf will set the current folder to inbox. After you remove a subfolder, rmf will set the current folder to that folder's parent. This is shown in the following example:

% folder
        do/re/mi+ has   8 messages (   1-  15); cur=  7.
% rmf
Remove folder "do/re/mi"? y
[+do/re now current]
If you try to remove a folder which has subfolders or any other non-MH files in it, rmf won't remove them -- it will complain and abort without removing the folder. But, before it aborts, it can remove the messages in the folder! Again, be careful with rmf.

The rmf command is also used to remove your reference to a read-only folder. See the Section Sharing Other Users' Folders.

[Table of Contents] [Index] [Previous: Removing and Recovering Messages] [Next: Annotating Headers with anno]


Last change $Date: 1996/06/06 15:13:17 $

This file is from the third edition of the book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, by Jerry Peek. Copyright © 1991, 1992, 1995 by O'Reilly & Associates, Inc. This file is freely-available; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For more information, see the file copying.htm.

Suggestions are welcome: Jerry Peek <jpeek@jpeek.com>