I am trying to write a Nant task which, given the pathname of a directory, will recursively remove all the files at all levels in the directory tree, but will NOT delete any of the directories themselves. This is needed so that we can 'purge' a deployment web site, but preserve the directory tree and configuration files, thus preserving various file system and web server permissions and attributes assigned to various nodes in the directory tree. I was hoping to do this with a single <delete> task, but have been unsuccessful in my attempts to create a <fileset> element which behaves properly. I tried using <include name="**" /> but that causes all the subdirectory nodes to be deleted as well. For example: <delete> <fileset basedir="${PurgeDeploymentDirectory_dir}"> <include name="**" /> </fileset> </delete>
Does anyone have any ideas how to approach this problem? Should I write this as a task that recursive walks the directory tree? Thanks, Ken Parrish Gomez, Inc.
------------------------------------------------------------------------------
_______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users