OK - convoluted nastiness but it works to make a quoted space delimited list of file names.

The two "commands" below are needed to translate all the '/' to ${file.separator} s in the
original property which are coded with '/' separators. and expand it to
the full path so it will compare character for character with the
path built by the final fileset.

<path id="xmlcode.dir">
     <pathelement location="${src.home}/XMLSource"/>
</path>

<pathconvert
     property="xmlcodedir"
     refid="xmlcode.dir"
/>

Now I can create the fileset for the source directory


<fileset dir="${xmlcodedir}" id="xmlcode.files">
     <include name="*.xml"/>
</fileset>

this will "map out" the path to ""
and will put '" "' between every two entries

<pathconvert targetos="unix"
             pathsep="&quot; &quot;"
             property="xmlfiles"
             refid="xmlcode.files"
>
    <map from="${xmlcodedir}" to=""/>
</pathconvert>

Now you just have to add the leading and trailing '"' and you have
a nice quoted space delimited list of files. (hopefully suitable for a command line="" argument in a <java/> task :)

<echo message="&quot;${xmlfiles}&quot;${line.separator}" />

~
~


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to