Moves files between folders.
refile [ -src +Folder ] [ -draft ] [ -file File ] [ Messages ] [ -nolink | -link ] [ -nopreserve | -preserve ] +Folder ...
The refile command moves messages between folders. If you do not specify a source folder, the refile command uses the current folder as the source. If you specify a destination folder that does not exist, the system requests permission to create it.
The refile command also copies messages from one folder to another. When moving a message, by default, the system does not keep a copy of the message in the original folder. To leave a copy behind, use the -preserve flag.
|-draft||Copies the current draft message from your mail directory.|
|-file File||Copies the specified file. The file must be in valid message format. Use the inc command to format and file new messages correctly.|
|+Folder||Copies the messages to the specified folder. Any number of folders can be specified.|
|-help||Lists the command syntax, available switches (toggles), and version information.|
|-link||Leaves the messages in the source folder or file after they are copied.|
|Messages|| Specifies the messages to be copied. You can specify several messages, a range of messages, or a single message. Use the following references to specify messages:
|-nolink||Removes the messages from the source folder or file after they are copied. This flag is the default.|
|-nopreserve||Renumbers the messages that are copied. Renumbering begins with a number one higher than the last message in the destination folder. This flag is the default.|
|-preserve||Preserves the message numbers of copied messages. If messages with these numbers already exist, the refile command issues an error message and does not alter the contents of the folders.|
|-src +Folder||Identifies the source folder. By default, the system uses the current folder.|
The following entries are part of the UserMHDirectory/.mh_profile file:
|Current-Folder:||Sets the default current folder.|
|Folder-Protect:||Sets the protection level for your new folder directories.|
|Path:||Specifies the UserMhDirectory.|
|rmmproc:||Specifies the program used to remove messages from a folder.|
refile +meetingsThe system responds with a message similar to the following:
Create folder "/home/jeanne/Mail/meetings"?Enter y to create the folder. A copy of the original message is not retained in the current folder.
refile -link +meetingsThe original message remains in the current folder.
refile -draft +testA copy of the message draft is not retained in the current folder.
refile +tom +pat +jayA copy of the message is not retained in the current folder.
|$HOME/.mh_profile||Sets the MH user profile.|
|/usr/bin/refile||Contains the refile command.|
The folder command, folders command.
The mh_alias file format, mh_profile file format.
Mail Overview in AIX Version 4.3 System User's Guide: Communications and Networks.
Peek, Jerry. MH and xmh: E-mail for Users and Programmers. Sebastopol, CA: O'Reilly & Associates, 1992.