You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Fletcher, Michael (Calgary)" <MF...@petro-canada.ca> on 2006/03/27 22:03:16 UTC

Remove the Children of a Folder

Hello

I am trying to remove almost all of the files in a folder except for the
"Logs" folder and the folder itself.  Unfortunately if the folder
doesn't contain a Logs folderthen the whole folder is removed.

This is a snippet of my build.xml.

-- CUT
<delete verbose="true" includeemptydirs="true">
	<fileset dir="\\pcaw2d1\wwwroot$\terminology" 
		defaultexcludes="false">

		<include name="**" />
		<exclude name="Logs" />

		<!-- Do not delete the actual folder -->
		<exclude name="." />

		
	</fileset>
</delete>
-- CUT AGAIN

How do I remove all the files in a folder but not the folder itself?

Michael Fletcher
Petro-Canada
 
--------------------------------------------------------

This email communication is intended as a private communication for the sole use of the primary addressee and those individuals listed for copies in the original message. The information contained in this email is private and confidential and If you are not an intended recipient you are hereby notified that copying, forwarding or other dissemination or distribution of this communication by any means is prohibited.  If you are not specifically authorized to receive this email and if you believe that you received it in error please notify the original sender immediately.  We honour similar requests relating to the privacy of email communications.
 
Cette communication par courrier electronique est une communication privee a l'usage exclusif du destinataire principal ainsi que des personnes dont les noms figurent en copie.  Les renseignements contenus dans ce courriel sont confidentiels et si vous n'etes pas le destinataire prevu, vous etes avise, par les presentes que toute reproduction, transfert ou autre forme de diffusion de cette communication par quelque moyen que ce soit est interdite.  Si vous n'etes pas specifiquement autorise a recevoir ce courriel ou si vous croyez l'avoir recu par erreur, veuillez en aviser l'expediteur original immediatement.  Nous respectons les demandes similaires qui touchent la confidentialite des communications par courrier electronique.

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