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.
Item | Description |
---|---|
-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. Note: For MH, the name of this flag must be fully spelled out. |
-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:
Item | Description |
---|---|
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. |
Attention RBAC users and Trusted AIX® users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.
refile +meetings
The 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 +tom +pat +jay
A copy of the message is not retained in the current folder.Item | Description |
---|---|
$HOME/.mh_profile | Sets the MH user profile. |
/usr/bin/refile | Contains the refile command. |