1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
3
<!-- Documenting T:NAnt.Core.Tasks.MoveTask-->
5
<meta http-equiv="Content-Language" content="en-ca" />
6
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
<link rel="stylesheet" type="text/css" href="../style.css" />
8
<title><move> Task</title>
11
<table width="100%" border="0" cellspacing="0" cellpadding="2" class="NavBar">
13
<td class="NavBar-Cell">
14
<a href="http://nant.sourceforge.net">
17
<img alt="->" src="../images/arrow.gif" />
18
<a href="../index.html">Help</a>
19
<img alt="->" src="../images/arrow.gif" />
20
<a href="../tasks/index.html">Task Reference</a>
21
<img alt="->" src="../images/arrow.gif" /> <move></td>
22
<td class="NavBar-Cell" align="right">
27
<p> Moves a file or set of files to a new file or directory. </p>
28
<p> Files are only moved if the source file is newer than the destination file, or if the destination file does not exist. However, you can explicitly overwrite files with the <code>overwrite</code> attribute. </p>
29
<p> A <a href="../types/fileset.html"><fileset></a> can be used to select files to move. To use a <a href="../types/fileset.html"><fileset></a>, the <code>todir</code> attribute must be set. </p>
31
<p> Unless an encoding is specified, the encoding associated with the system's current ANSI code page is used. </p>
32
<p> An UTF-8, little-endian Unicode, and big-endian Unicode encoded text file is automatically recognized, if the file starts with the appropriate byte order marks. </p>
34
<b>Note:</b> If you employ filters in your move operation, you should limit the move to text files. Binary files will be corrupted by the move operation. </p>
40
<th style="text-align: center;">Type</th>
42
<th style="text-align: center;">Required</th>
45
<td valign="top">file</td>
46
<td style="text-align: center;">file</td>
47
<td> The file to move. </td>
48
<td style="text-align: center;">False</td>
51
<td valign="top">flatten</td>
52
<td style="text-align: center;">bool</td>
53
<td> Ignore directory structure of source directory, move all files into a single directory, specified by the <code>todir</code> attribute. The default is <b>false</b>. </td>
54
<td style="text-align: center;">False</td>
57
<td valign="top">todir</td>
58
<td style="text-align: center;">directory</td>
59
<td> The directory to move to. </td>
60
<td style="text-align: center;">False</td>
63
<td valign="top">tofile</td>
64
<td style="text-align: center;">file</td>
65
<td> The file to move to. </td>
66
<td style="text-align: center;">False</td>
69
<td valign="top">failonerror</td>
70
<td style="text-align: center;">bool</td>
71
<td> Determines if task failure stops the build, or is just reported. The default is <b>true</b>. </td>
72
<td style="text-align: center;">False</td>
75
<td valign="top">if</td>
76
<td style="text-align: center;">bool</td>
77
<td> If <b>true</b> then the task will be executed; otherwise, skipped. The default is <b>true</b>. </td>
78
<td style="text-align: center;">False</td>
81
<td valign="top">includeemptydirs</td>
82
<td style="text-align: center;">bool</td>
83
<td> Copy any empty directories included in the <a href="../types/fileset.html"><fileset></a>. The default is <b>true</b>. </td>
84
<td style="text-align: center;">False</td>
87
<td valign="top">inputencoding</td>
88
<td style="text-align: center;">
89
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemTextEncodingClassTopic.asp">Encoding</a>
91
<td> The encoding to use when reading files. The default is the system's current ANSI code page. </td>
92
<td style="text-align: center;">False</td>
95
<td valign="top">outputencoding</td>
96
<td style="text-align: center;">
97
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemTextEncodingClassTopic.asp">Encoding</a>
99
<td> The encoding to use when writing the files. The default is the encoding of the input file. </td>
100
<td style="text-align: center;">False</td>
103
<td valign="top">overwrite</td>
104
<td style="text-align: center;">bool</td>
105
<td> Overwrite existing files even if the destination files are newer. The default is <b>false</b>. </td>
106
<td style="text-align: center;">False</td>
109
<td valign="top">unless</td>
110
<td style="text-align: center;">bool</td>
111
<td> Opposite of <code>if</code>. If <b>false</b> then the task will be executed; otherwise, skipped. The default is <b>false</b>. </td>
112
<td style="text-align: center;">False</td>
115
<td valign="top">verbose</td>
116
<td style="text-align: center;">bool</td>
117
<td> Determines whether the task should report detailed build log messages. The default is <b>false</b>. </td>
118
<td style="text-align: center;">False</td>
122
<h3>Nested Elements:</h3>
127
<<a href="../types/fileset.html">fileset</a>>
129
<div class="nested-element"> Used to select the files to move. To use a <a href="../types/fileset.html"><fileset></a>, the <code>todir</code> attribute must be set. <p /></div>
133
</<a href="../types/fileset.html">fileset</a>>
139
<<a href="../types/filterchain.html">filterchain</a>>
141
<div class="nested-element"> Chain of filters used to alter the file's content as it is moved. <p /></div>
145
</<a href="../types/filterchain.html">filterchain</a>>
148
<ul class="examples">
150
<p> Move a single file while changing its encoding from "latin1" to "utf-8". </p>
155
inputencoding="latin1"
156
outputencoding="utf-8" />
160
<p>Move a set of files.</p>
162
<move todir="${build.dir}">
163
<fileset basedir="bin">
164
<include name="*.dll" />
170
<p> Move a set of files to a directory, replacing <code>@TITLE@</code> with "Foo Bar" in all files. </p>
172
<move todir="../backup/dir">
173
<fileset basedir="src_dir">
174
<include name="**/*" />
177
<replacetokens>
178
<token key="TITLE" value="Foo Bar" />
179
</replacetokens>
185
<h3>Requirements</h3>
186
<div style="margin-left: 20px;">
187
<b>Assembly:</b> NAnt.Core (0.90.3780.0)
b'\\ No newline at end of file'