You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Henrik Gemal <he...@mail.dk> on 2006/01/24 13:29:46 UTC

loop in ant

I need to loop until I can delete a directory. The directory is locked 
when the user is running a client.

My current code looks like this, but it only checks two times. I really 
need to loop untill the delete is succesfull.

Can it be done?

<var name="test" value="" unset="true" />
<available file="${file}.jar" property="test" />
<if>
    <equals arg1="${test}" arg2="true" />
    <then>
        <delete dir="${dir}" failonerror="false" />
        <var name="test" value="" unset="true" />
        <available file="${file}.jar" property="test" />
        <if>
            <equals arg1="${test}" arg2="true" />
            <then>
                <input>Exit your client and press Enter to 
continue...</input>
                <delete dir="${dir}" />
            </then>
        </if>
    </then>
</if>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org