【问题标题】:ANT how can I make a new dir with the current date as part of the dir nameANT 如何使用当前日期创建一个新目录作为目录名称的一部分
【发布时间】:2013-06-03 14:14:07
【问题描述】:

我想使用基于 ANT 的部署工具。 使用 ANT 如何创建一个新的目录,将当前日期作为目录名称的一部分?

【问题讨论】:

  • 什么样的目录?在您的机器上本地还是在 Salesforce 内部?

标签: deployment


【解决方案1】:

你可以用这个:

<target name="account">
  <tstamp>
    <format property="tstamped-file-name" pattern="ddMMMyyhhmmss" locale="nl,NL"/>
  </tstamp>

    <if>
        <available file="data/accounts.csv" property="account.present"/>
        <then>
             <sfdc object="AccountUpsertProcess"/>
             <move todir="status-history/Account${tstamped-file-name}">
                <fileset dir="data">
                    <include name="accounts.csv"/>
                </fileset>
                <fileset dir="status">
                    <include name="AccountUpsertProcess*.csv"/>
                </fileset>
             </move>
        </then>
        <else>
           <echo message="No account file"/>
        </else>
    </if>

</target>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-08-26
    • 2012-07-04
    • 1970-01-01
    • 1970-01-01
    • 2012-10-25
    • 2019-03-16
    • 1970-01-01
    相关资源
    最近更新 更多