ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barry Ku <>
Subject How do I empty a directory in 1.4.1
Date Tue, 29 Jan 2002 05:20:47 GMT
How do I delete everything including subdirectories in
a directory, but keep the directory in 1.4.1?

The following works in 1.3, however, it removes the
directory itself in 1.4.1.

<delete includeEmptyDirs="true">
<fileset dir="${dist}" />

I thought it's a bug at first, then I found the
documentation in 1.4.1 has changed for the last
example in the Delete task. The 2nd example in the

<delete dir="$(dist)">

does the samething as the last one.  Why do we need
both if they are doeing exactly the same thing?

In order to may my old script work in 1.4.1, I have to
add the following right after my old script,

<mkdir dir="${dist}"/>

This works, but I wonder if there's a more elegant


Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions!

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message