----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 06, 2004 7:48 PM
Subject: [Nant-users] Curious NAnt behavior with XCOPY


> Hi,
>
> I've got a curious problem...
>
> As part of our build process, I need to copy one directory
> full of files recursively to another location. I can think of
> several ways to approach this problem, but none of them
> are quite satisfactory.
>
> 1. As far as I can tell by reading and experience, the
> <copy> task will flatten a directory of files into the "todir"
> location. For instance, this task:
>
>       <copy todir="d:/temp/bar/" overwrite="true" verbose="true"
> flatten="false">
>          <fileset>
>           <includes name="d:\temp\foo\**" />
>        </fileset>
>       </copy>

You need to set the basedir of the fileset ....

eg.

<copy todir="d:/temp/bar/" overwrite="true" verbose="true" flatten="false">
    <fileset basedir="d:\temp\foo">
        <include name="**/**" />
    </fileset>
</copy>

> 2. Since that didn't work, I turned to the old standby, "<exec ... "xcopy"
> ...>
> So I tried this:
>
> <target name="testXCopy">
>       <exec
>             program="C:\winnt\system32\xcopy.exe"
>             commandline="d:\temp\foo d:\temp\bar /s/e/q/y"
>       />
> </target>

This is working fine using the latest nightly build
(http://nant.sourceforge.net/nightly/builds).

Gert



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to