ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan \"Rambius\" Ivanov" <rambiusparkisan...@yahoo.com>
Subject RE: Check if files exist in a folder before I tar
Date Tue, 28 Feb 2006 22:22:29 GMT
Hello

--- Paul Faulstich <pfaulstich@llbean.com> wrote:
> 
> Is there a way to tell if a fileset is empty?  If
> so, he could just create a fileset based on that dir
> and check it. I haven't found such a task if there
> is one.

Yes, there is a way to tell if a fileset is empty: use
<pathconvert> task with its setOnEmpty attribute.

Regards
Ivan

> -----Original Message-----
> From: Jan.Materne@rzf.fin-nrw.de
> [mailto:Jan.Materne@rzf.fin-nrw.de] 
> Sent: Tuesday, February 28, 2006 12:02 PM
> To: user@ant.apache.org
> Subject: AW: Check if files exist in a folder before
> I tar
> 
> <tstamp/>
> <tar
>
destfile="${backup.dir}/backup_${DSTAMP}_${TSTAMP}.tar">
>     <fileset dir="${data.dir}">
>         <modified/>
>     </>
> </>
> 
> 
> Jan
> 
> >-----Urspr�ngliche Nachricht-----
> >Von: Eric Wood [mailto:EWood@llbean.com]
> >Gesendet: Dienstag, 28. Februar 2006 17:37
> >An: Ant Users List
> >Betreff: RE: Check if files exist in a folder
> before I tar
> >
> >I don't know the names of the files in the
> directory. I want to 
> >determine if there are any files in the directory
> before I attempt to 
> >tar.
> >
> >Eric
> >
> >-----Original Message-----
> >From: Jan.Materne@rzf.fin-nrw.de
> [mailto:Jan.Materne@rzf.fin-nrw.de]
> >Sent: Tuesday, February 28, 2006 10:52 AM
> >To: user@ant.apache.org
> >Subject: AW: Check if files exist in a folder
> before I tar
> >
> ><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
> >
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org For additional 
> >commands, e-mail: user-help@ant.apache.org
> >
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org For additional
> commands, e-mail: user-help@ant.apache.org
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Mime
View raw message