ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: Getting ":" delimeted, "flattened" list of files in a property?
Date Thu, 18 Apr 2002 17:58:33 GMT
--- Peter Villiers <> 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.

  <property name="dist.server.dir" location="dir2/dir3" />

  <fileset id="test.fileset" dir="${dist.server.dir}">
    <include name="*.txt" />

  <target name="test">
    <pathconvert pathsep=":" refid="test.fileset"
      <map from="${dist.server.dir}${file.separator}" to="" />
    <echo>test.filelist = ${test.filelist}</echo>



Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message