learner
learner

Reputation: 2789

How to copy one folder content to another folder in Nant script?

I need to copy folder A content to folder B using Nant script. If folder B is already existing it should delete first and create new folder named B and copy folder A content to it. How can I do that using Nant script?

Please help me.

Thanks

Upvotes: 1

Views: 1055

Answers (1)

Paul
Paul

Reputation: 5576

You should be able to use a combination of the DELETE and MOVE tasks...

<delete dir="${build.dir}" />

<move todir="${build.dir}">
    <fileset basedir="bin">
        <include name="*.dll" />
    </fileset>
</move>

http://nant.sourceforge.net/release/0.85/help/tasks/delete.html

http://nant.sourceforge.net/release/0.85/help/tasks/move.html

Upvotes: 1

Related Questions