OK, Thank you so much!
David Weintraub wrote: > > Hmmm... > > You could create a PATH ID, then convert that over to a property, then > check that the property is not empty. The following build.xml has been > tested and checks for the presents of files in that directory. > However, it will report a directory as empty if it contains just empty > directories: > > <project name="test" default="test" basedir="."> > > <path id="test.me"> > <fileset dir="${basedir}/test.dir"/> > </path> > > <property name="test.me.property" refid="test.me"/> > > <condition property="empty.dir.flag"> > <equals arg1="" arg2="${test.me.property}"/> > </condition> > > <target name="test1" > if="empty.dir.flag"> > <echo>Directory "test.dir" is empty</echo> > </target> > > <target name="test" > depends="test1" > unless="empty.dir.flag"> > <echo>Directory "test.dir" is not empty</echo> > </target> > </project> > > I was seeing if there was someway to do this via a filterchange, but > couldn't see anyway. > > -- > David Weintraub > [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Check-if-a-directory-is-empty-tf4595246.html#a13130373 Sent from the Ant - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]