1

ANT ベースの展開ツールを使用したいと考えています。ANT を使用して、現在の日付をディレクトリ名の一部として使用して新しいディレクトリを作成するにはどうすればよいですか?

4

1 に答える 1

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>
于 2013-06-04T06:57:41.820 に答える