Man pages: Replaced \*(lq and \*(rq with ` and '.
[mmh] / man / refile.man1
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH REFILE %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
5 .SH NAME
6 refile \- file message in other folders
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B refile
11 .RI [ msgs ]
12 .RB [ \-link " | " \-nolink ]
13 .RB [ \-src
14 .IR +folder ]
15 .RB [ \-file
16 .IR file ]
17 .I +folder1
18 \&...
19 .RB [ \-Version ]
20 .RB [ \-help ]
21 .ad
22 .SH DESCRIPTION
23 .B Refile
24 moves (see
25 .BR mv (1))
26 or links (see
27 .BR ln (1))
28 messages
29 from a source folder into one or more destination folders.
30 .PP
31 If you think of a message as a sheet of paper, this operation is not
32 unlike filing the sheet of paper (or copies) in file cabinet folders.
33 When a message is filed, it is linked into the destination folder(s)
34 if possible, and is copied otherwise.  As long as the destination
35 folders are all on the same file system, multiple filing causes little
36 storage overhead.  This facility provides a good way to cross\-file or
37 multiply\-index messages.  For example, if a message is received from
38 Jones about the ARPA Map Project, the command
39 .PP
40 .RS 5
41 refile\0cur\0+jones\0+Map
42 .RE
43 .PP
44 would allow the message to be found in either of the two folders `jones'
45 or `Map'.
46 .PP
47 You may specify the source folder using
48 .B \-src
49 .IR +folder .
50 If this is
51 not given, the current folder is used by default.  If no message is
52 specified, then `cur' is used by default.
53 .PP
54 The option
55 .B \-file
56 .I file
57 directs
58 .B refile
59 to use the specified file
60 as the source message to be filed, rather than a message from a folder.
61 Note that the file should be a validly formatted message, just like
62 any other
63 .B nmh
64 message.  It should
65 .B NOT
66 be in mail drop format
67 (to convert a file in mail drop format to a folder of
68 .B nmh
69 messages,
70 see
71 .BR inc (1)).
72 .PP
73 If a destination folder doesn't exist,
74 .B refile
75 will ask if you want
76 to create it.  A negative response will abort the file operation.  If the
77 standard input for
78 .B refile
79 is
80 .B not
81 a tty, then
82 .B refile
83 will not ask any questions and will proceed as if the user answered
84 `yes' to all questions.
85 .PP
86 The option
87 .B \-link
88 preserves the source folder copy of the message (i.e.,
89 it does a
90 .BR ln (1)
91 rather than a
92 .BR mv (1)),
93 whereas,
94 .B \-nolink
95 (the default) deletes the filed messages from the source folder.
96 No backups are kept, because the contents don't vanish.
97 They are only moved to a new location.
98 To restore: refile the other way.
99
100 .SH FILES
101 .fc ^ ~
102 .nf
103 .ta \w'%etcdir%/ExtraBigFileName  'u
104 ^$HOME/.mmh/profile~^The user profile
105 .fi
106
107 .SH "PROFILE COMPONENTS"
108 .fc ^ ~
109 .nf
110 .ta 2.4i
111 .ta \w'ExtraBigProfileName  'u
112 ^Path:~^To determine the user's mail storage
113 ^Current\-Folder:~^To find the default current folder
114 ^Folder\-Protect:~^To set mode when creating a new folder
115 .fi
116
117 .SH "SEE ALSO"
118 folder(1), rmf(1), rmm(1)
119
120 .SH DEFAULTS
121 .nf
122 .RB ` "\-src\ +folder" "' defaults to the current folder"
123 .RB ` msgs "' defaults to cur"
124 .RB ` \-nolink '
125 .fi
126
127 .SH CONTEXT
128 If
129 .B \-src
130 .I +folder
131 is given, it will become the current folder.
132 If
133 .B \-link
134 is specified, the current message in the
135 source folder will be set to the last message specified; otherwise, the
136 current message won't be changed.
137 .PP
138 If the `Previous\-Sequence' profile entry is set, in addition to defining
139 the named sequences from the source folder,
140 .B refile
141 will also define
142 those sequences for the destination folders.  See
143 .B mh\-sequence (7)
144 for information concerning the previous sequence.