Re: Help copying a folder structure
Bob Archer <[email protected]> Thu, 31 May 2012 09:44:27 -0400
| Newsgroups | gmane.comp.windows.dotnet.nant.user |
|---|---|
| Message-ID | <[email protected]> |
--===============6344330862461093361==
Content-Language: en-US
Content-Type: multipart/alternative;
boundary="_000_CB4587DA62024B40B9F929ECF639210F3A7A530991USALWEXMB4inf_"
--_000_CB4587DA62024B40B9F929ECF639210F3A7A530991USALWEXMB4inf_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
If you want to go FROM src TO dest, it looks like you have your code backwa=
rds... shouldn't it be:
<copy todir=3D"${destDir}">
<fileset basedir=3D"${srcDir}>
<include name=3D"**" />
</fileset>
</copy>
Also, you can (should be able to) simplify your include to "**" which shoul=
d match all files and folders.
BOb
From: Chris Fouts [mailto:[email protected]]
Sent: Wednesday, May 30, 2012 3:39 PM
To: [email protected]
Subject: Re: [NAnt-users] Help copying a folder structure
This way...
<copy todir=3D"${srcDir}">
<fileset basedir=3D"${destDir}>
<include name=3D"**\*" />
</fileset>
</copy>
From: Chris Fouts [mailto:[email protected]]
Sent: Wednesday, May 30, 2012 3:13 PM
To: [email protected]
Subject: [NAnt-users] Help copying a folder structure
I looked at this http://nant.sourceforge.net/nightly/latest/help/tasks/copy=
.html, and googled some.
I want to copy files from ${srcDir} to ${destDir} and preserve the director=
y struncture. I tried this, but the directory structure is NOT preserved in=
${destDir}. Any clues?
<copy todir=3D"${srcDir}">
<fileset>
<include name=3D"${destDir}\**\*" />
</fileset>
</copy>
-chris
***This e-mail message is intended only for the above named recipient(s)
and may contain information that is sensitive or proprietary. If you have
received this message in error or are not the named recipient(s), please
immediately notify the sender, delete this e-mail message without making
a copy and do not disclose or relay this e-mail message to anyone.***
--_000_CB4587DA62024B40B9F929ECF639210F3A7A530991USALWEXMB4inf_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV=3D"Content-Type" CONTENT=
=3D"text/html; charset=3Dus-ascii"><meta name=3DGenerator content=3D"Micros=
oft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin-top:6.0pt;
margin-right:0in;
margin-bottom:6.0pt;
margin-left:0in;
font-size:10.0pt;
font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle21
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
span.EmailStyle24
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue vli=
nk=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span style=3D'c=
olor:#1F497D'>If you want to go FROM src TO dest, it looks like you have yo=
ur code backwards… shouldn’t it be:<o:p></o:p></span></p><p cla=
ss=3DMsoNormal><span style=3D'color:#1F497D'><o:p> </o:p></span></p><p=
class=3DMsoNormal><copy todir=3D"${destDir}"><o:p></o:p></=
p><p class=3DMsoNormal> <fileset basedir=3D”${src=
Dir}><o:p></o:p></p><p class=3DMsoNormal> =
<include name=3D"**" /><o:p></o:p></p><p class=3DMsoNormal>=
</fileset><o:p></o:p></p><p class=3DMsoNorma=
l></copy><o:p></o:p></p><p class=3DMsoNormal><span style=3D'color:#1F=
497D'><o:p> </o:p></span></p><p class=3DMsoNormal><span style=3D'color=
:#1F497D'>Also, you can (should be able to) simplify your include to “=
;**” which should match all files and folders.<o:p></o:p></span></p><=
p class=3DMsoNormal><span style=3D'color:#1F497D'><o:p> </o:p></span><=
/p><p class=3DMsoNormal><span style=3D'color:#1F497D'>BOb<o:p></o:p></span>=
</p><p class=3DMsoNormal><span style=3D'color:#1F497D'><o:p> </o:p></s=
pan></p><p class=3DMsoNormal><span style=3D'color:#1F497D'><o:p> </o:p=
></span></p><div style=3D'border:none;border-left:solid blue 1.5pt;padding:=
0in 0in 0in 4.0pt'><div><div style=3D'border:none;border-top:solid #B5C4DF =
1.0pt;padding:3.0pt 0in 0in 0in'><p class=3DMsoNormal><b><span style=3D'fon=
t-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span styl=
e=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Chris Fouts [mail=
to:[email protected]] <br><b>Sent:</b> Wednesday, May 30, 2012 3:39=
PM<br><b>To:</b> [email protected]<br><b>Subject:</b> Re: [=
NAnt-users] Help copying a folder structure<o:p></o:p></span></p></div></di=
v><p class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal><span styl=
e=3D'color:#1F497D'>This way…<o:p></o:p></span></p><p class=3DMsoNorm=
al><span style=3D'color:#1F497D'><o:p> </o:p></span></p><p class=3DMso=
Normal><copy todir=3D"${srcDir}"><o:p></o:p></p><p class=3D=
MsoNormal> <fileset basedir=3D”${destDir}><o:p=
></o:p></p><p class=3DMsoNormal> <include =
name=3D"**\*" /><o:p></o:p></p><p class=3DMsoNormal> &nbs=
p; </fileset><o:p></o:p></p><p class=3DMsoNormal></cop=
y><o:p></o:p></p><p class=3DMsoNormal><span style=3D'color:#1F497D'><o:p=
> </o:p></span></p><p class=3DMsoNormal><span style=3D'color:#1F497D'>=
<o:p> </o:p></span></p><div><div style=3D'border:none;border-top:solid=
#B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=3DMsoNormal><b><span sty=
le=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><=
span style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Chris Fo=
uts [mailto:[email protected]] <br><b>Sent:</b> Wednesday, May 30, =
2012 3:13 PM<br><b>To:</b> [email protected]<br><b>Subject:<=
/b> [NAnt-users] Help copying a folder structure<o:p></o:p></span></p></div=
></div><p class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>I loo=
ked at this <a href=3D"http://nant.sourceforge.net/nightly/latest/help/task=
s/copy.html">http://nant.sourceforge.net/nightly/latest/help/tasks/copy.htm=
l</a>, and googled some.<o:p></o:p></p><p class=3DMsoNormal><o:p> </o:=
p></p><p class=3DMsoNormal>I want to copy files from ${srcDir} to ${destDir=
} and preserve the directory struncture. I tried this, but the directory st=
ructure is NOT preserved in ${destDir}. Any clues?<o:p></o:p></p><p class=
=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal><copy todir=3D&qu=
ot;${srcDir}"><o:p></o:p></p><p class=3DMsoNormal>  =
;<fileset><o:p></o:p></p><p class=3DMsoNormal>  =
; <include name=3D"${destDir}\**\*" /><o:p></o:p></p>=
<p class=3DMsoNormal> </fileset><o:p></o:p></=
p><p class=3DMsoNormal></copy><o:p></o:p></p><p class=3DMsoNormal><o:=
p> </o:p></p><p class=3DMsoNormal>-chris<o:p></o:p></p><p><br>***This =
e-mail message is intended only for the above named recipient(s)<br>and may=
contain information that is sensitive or proprietary. If you have<br>recei=
ved this message in error or are not the named recipient(s), please <br>imm=
ediately notify the sender, delete this e-mail message without making<br>a =
copy and do not disclose or relay this e-mail message to anyone.***<o:p></o=
:p></p></div></div></body></html>=
--_000_CB4587DA62024B40B9F929ECF639210F3A7A530991USALWEXMB4inf_--
--===============6344330862461093361==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
--===============6344330862461093361==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
NAnt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users
--===============6344330862461093361==--