--- Peter Villiers <[EMAIL PROTECTED]> wrote:
> Sorry for this basic question but I would like to get a list of files
> from a given directory (no path info) into a property. The files should
> be delimted by a ":".
>
> For example, I have a directory c:\dir1\dir2\dir3 that contains files
> a.txt and b.txt and I want to have a property that has the value
> "a.txt:b.txt" so that I can pass it as an argument in an <exec> tag.
Try:
<property name="dist.server.dir" location="dir2/dir3" />
<fileset id="test.fileset" dir="${dist.server.dir}">
<include name="*.txt" />
</fileset>
<target name="test">
<pathconvert pathsep=":" refid="test.fileset"
property="test.filelist">
<map from="${dist.server.dir}${file.separator}" to="" />
</pathconvert>
<echo>test.filelist = ${test.filelist}</echo>
</target>
Diane
=====
([EMAIL PROTECTED])
__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>