Nant <copy> and maintain directory structure
Asked Answered
K

1

8

How do you use the nant <copy> command and maintain the directory structure? This is what I am doing, but it is copying all the files to a single directory.

<copy todir="..\out">
  <fileset>
    <includes name="..\src\PrecompiledWeb\**\*" />
  </fileset>
</copy>
Katheykathi answered 8/9, 2008 at 12:54 Comment(0)
E
15

Try:

<fileset baseDir="../src/PrecompiledWeb"><includes name="**/*" />
Escarp answered 8/9, 2008 at 13:23 Comment(2)
Just a small note : basedir is lower-case at least now. ( nant.sourceforge.net/nightly/latest/help/types/fileset.html )Blast
Here's why this works "Files that are not located under the the base directory of the <fileset> will be copied directly under to the destination directory, regardless of the value of the flatten attribute." nant.sourceforge.net/release/latest/help/tasks/copy.htmlMukund

© 2022 - 2024 — McMap. All rights reserved.