--- Chris Bailey <[EMAIL PROTECTED]> wrote: > I'd like to use the Foreach ant-contrib task to iterate over a set of > directories, and assign the name of the directory to a property. By the > name, I mean, just the individual directory name. e.g. if the dir is > "/foo/bar/goo", then I just want "goo". Is there a way to do this in > Ant for a FileSet (or some other way)?
Is there some reason you're starting with a FileSet instead of a DirSet? You can do what you want using <dirname> and <basename> (in combination with <pathconvert> and <foreach>), but it'd be simpler if you started with a DirSet instead. (Although it'd be simpler still if <basename> and <dirname> were enhanced to allow for a <fileset>/<dirset> -- patches happily accepted :) Diane ===== ([EMAIL PROTECTED]) __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
