Hello,

Thank you for your suggestions.

Using embedded <file name="..."/> would work if i had the list of
files upfront. But I only have it at runtime. I'll check if short
filenames can help me. This can be tricky as I need to strip out the
base directory with short file names from my file list...

Thanks,

On Thu, Jun 24, 2010 at 11:17 PM, Michael Ludwig <mil...@gmx.de> wrote:
> Patrick Martin schrieb am 24.06.2010 um 21:21 (+0200):
>> Sorry, I meant to say that "spaces in filenames are unfriendly with
>> filelist", not filesets....
>
> Not sure I understand the problem you're facing, but <filelist>
> definitely works with filenames containing spaces, you just have
> to put them in a nested <file> element.
>
> G:\dev\Ant :: more /t2 spacelist.txt
> G:\dev\Ant\dir with spaces\d r e i.txt
> G:\dev\Ant\dir with spaces\eins.txt
> G:\dev\Ant\dir with spaces\zwei.txt
>
> G:\dev\Ant :: more /t2 spacelist.xml
> <!-- vim: set filetype=ant :-->
> <project>
>
>  <echo>Do &lt;loadfile> and &lt;filelist>
>  work with spacy filenames?</echo>
>
>  <loadfile property="file.list" srcfile="spacelist.txt"/>
>  <echo message="${file.list}"/>
>  <echo>  So it works using &lt;loadfile>.</echo>
>
>  <filelist id="space.list" dir="dir with spaces"
>    files="eins.txt zwei.txt">
>    <file name="d r e i.txt"/>
>  </filelist>
>  <pathconvert refid="space.list"
>    pathsep="${line.separator}" property="space.prop"/>
>  <echo message="${space.prop}"/>
>  <echo>  And it also works using &lt;filelist>.</echo>
>
> </project>
>
> G:\dev\Ant :: ant -f spacelist.xml
> Buildfile: G:\dev\Ant\spacelist.xml
>     [echo] Do <loadfile> and <filelist>
>     [echo]   work with spacy filenames?
>     [echo] G:\dev\Ant\dir with spaces\d r e i.txt
>     [echo] G:\dev\Ant\dir with spaces\eins.txt
>     [echo] G:\dev\Ant\dir with spaces\zwei.txt
>     [echo]   So it works using <loadfile>.
>     [echo] G:\dev\Ant\dir with spaces\eins.txt
>     [echo] G:\dev\Ant\dir with spaces\zwei.txt
>     [echo] G:\dev\Ant\dir with spaces\d r e i.txt
>     [echo]   And it also works using <filelist>.
>
> BUILD SUCCESSFUL
>
> --
> Michael Ludwig
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
> For additional commands, e-mail: user-h...@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to