Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Other Build Tools
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Other Build Tools
Ant task to delete directory contents
Dan Howard
Ranch Hand
Posts: 47
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi All,
I normally use an
ant
task to delete a directory like this:
<delete dir="${some.dir}"/>
But what I really need is a task to delete all the files and folders in a directory but not the directory itself.
Is there such an animal?
TIA
Gregg Bolinger
Ranch Hand
Posts: 15304
6
I like...
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
From Ant's
docs
delete includeemptydirs="true"> <fileset dir="build" includes="**/*"/> </delete>
deletes all files and subdirectories of build, without build itself.
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
is it a bug or somethingelse?
How to delete a directory in unix box using ant
java.util.zip.ZipException: error in opening zip file
Undoing a Clean
Delete everything in directory except directory, how ?
More...