Matt Benson wrote: > > > (given same dirset id=ds) > <pathconvert refid="ds" property="includes" pathsep="${line.separator}"> > <regexpmapper from="(^.*$)" to="\1${file.separator}**" /> > </pathconvert> > <echo file="includesfile">${includes}</echo> > <delete> > <files includesfile="includesfile" /> > </delete> > <delete file="includesfile" /> > >
Great tip! But I have problems with the to= part of the regex pattern on Windows. The file.separator on Windows is the backslash, which is the escape character for the regex. Therefore the file will include patterns like 'foo\bar**' instead of 'foo\bar\**'. And then the delete does not work. Do you have some more magic to make it work on Windows as well? Thanks, Daniel -- View this message in context: http://www.nabble.com/Delete-N-directories-that-match-a-regexp-tp22727856p25328990.html Sent from the Ant - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org