ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: Check if files exist in a folder before I tar
Date Tue, 28 Feb 2006 15:52:18 GMT
<available property="file.present">
<target unless="file.present">
    <untar/>
</target>


Jan 

>-----Urspr√ľngliche Nachricht-----
>Von: Eric Wood [mailto:EWood@llbean.com] 
>Gesendet: Dienstag, 28. Februar 2006 16:50
>An: user@ant.apache.org
>Betreff: Check if files exist in a folder before I tar
>
>What is the easiest way to check if files exist in a folder 
>prior to attempting to back them up via tar?
>
>Tar fails if I run it asking it to back up files and no files exist. 
>
>        <tar destfile="${backup.dir}/${current.dir}.tar">
>            <tarfileset dir="${gen.dir}" >
>                <include name="*.*" />
>            </tarfileset>
>        </tar>
>
>Eric
>

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


Mime
View raw message