【问题标题】:How to copy one folder content to another folder in Nant script?如何将一个文件夹内容复制到 Nant 脚本中的另一个文件夹?
【发布时间】:2011-09-05 10:43:11
【问题描述】:

我需要使用 Nant 脚本将文件夹 A 的内容复制到文件夹 B。如果文件夹 B 已经存在,则应首先删除并创建名为 B 的新文件夹并将文件夹 A 的内容复制到其中。我怎样才能使用 Nant 脚本做到这一点?

请帮帮我。

谢谢

【问题讨论】:

    标签: xml nant


    【解决方案1】:

    您应该能够结合使用 DELETE 和 MOVE 任务...

    <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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-20
      • 2019-12-20
      • 2021-12-27
      • 2018-10-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多