Thanks for the solution Brass! But the issue here is if I have created a folder named "obj" (different from the intermediate "obj" folder) which contains some files that I use in the project, then this "clean" target will also delete my "obj" folder which I do not want to happen. Could you guide in this case?
-Manjusha -----Original Message----- From: Brass Tilde [mailto:brassti...@gmail.com] Sent: Tuesday, December 23, 2008 6:32 PM To: nant-developers@lists.sourceforge.net Subject: Re: [nant-dev] Want to delete intermediate files n folders (obj) > I want to delete the intermediate files and folders that are generated while > building the .NET projects (folder "obj" and its contents). There are many > projects in a build file that are to be built and each project's "obj" > folder needs to be deleted. Writing a target "Clean" and deleting all these > "obj" folders manually will be a tedious job. Hence, I want to know is there > any easy way to achieve this? Assuming that the "workingPath" property contains the name of the ultimate parent of all the directories you want to delete, you could do something like this: <target name="clean" failonerror="true" description="Remove all products of previous compilations"> <delete> <fileset> <include name="${workingpath}/**/bin/**/*" /> <include name="${workingpath}/**/obj/**/*" /> </fileset> </delete> </target> I forget whether or not that actually deletes the directory, and I'm not currently in a place where I can test it, but you should be able to experiment with it. /bs ------------------------------------------------------------------------ ------ _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers -------------------------------------------------------- Important Notice to Recipients: It is important that you do not use e-mail to request, authorize or effect the purchase or sale of any security or commodity, to send fund transfer instructions, or to effect any other transactions. Any such request, orders, or instructions that you send will not be accepted and will not be processed by Morgan Stanley. ------------------------------------------------------------------------------ _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers