Jeff et al I could never get delete dir= to work so I coded my own Regards, Martin- ----- Original Message ----- From: "Jeff Davidson" <[EMAIL PROTECTED]> To: "Ant Users List" <[EMAIL PROTECTED]> Sent: Monday, September 27, 2004 6:10 PM Subject: RE: Delete Files and SubFolders
Brent, If you're using Ant 1.6.2 (I do not know which earlier distributions this same syntax may apply to) I'm pretty sure you can simply use: <delete dir="/bin/blocks" /> <delete dir="/conf" /> http://ant.apache.org/manual/CoreTasks/delete.html (taken from http://ant.apache.org/manual/index.html) I was using this approach (under Windows) to implement the "scorched earth" approach to checking out files for my master build, i.e. <delete dir=${my_checkout_dir}" /> Regards, ~Jeff D. -----Original Message----- From: Brent Bain [mailto:[EMAIL PROTECTED] Sent: September 27, 2004 15:06 To: '[EMAIL PROTECTED]' Subject: Delete Files and SubFolders Hello: I am trying to use the following code to delete everything under subfolders (including deleting the subfolders themselves). I can't seem to get it to work. I'm not sure if it's because I'm using a <path> or not. I'm using the antcontrib task to convert the path to a fileset (<pathtofileset>) -- my code looks like this: <path id="codeBase.pathList"> <fileset dir="${deploy.codeBase}"> <include name="bin/**" /> <include name="conf/**" /> </fileset> </path> <target name="All"> <property name="deploy.codeBase" value="c:/deploy/" /> <pathtofileset name="delBase.pathList.fileset" dir="${deploy.codeBase}" pathrefid="codeBase.pathList" /> <delete includeEmptyDirs="true"> <fileset refid="delBase.pathList.fileset" /> </delete> </target> This deletes the FILES but not the folders. My directory structure looks like: c:\ deploy bin blocks conf properties wwwroot images etc... What I'm trying to do is delete /bin/blocks/ and /conf/ completey. If anyone can help I'd greatly appreciate it! Thanks, Brent This electronic message transmission, including attachments, is for the exclusive use of the individuals to which this e-mail is addressed and is to be reviewed and used exclusively for authorized company purposes. This transmission may contain proprietary, confidential or privileged information. If you are not the intended recipient of this transmission, you are hereby notified that any use, copying, disclosure, dissemination, distribution or taking of any action in reliance upon the contents of this transmission is strictly prohibited. If you believe you may have received this electronic message in error, please notify the sender immediately by return email and delete or destroy the original message and/or any copy of it from your computer system and/or your files. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]