ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <mgai...@hotmail.com>
Subject RE: Copying a static list of files
Date Thu, 24 Jun 2010 23:46:37 GMT

spaces are considered whitespace delimiters by every almost every parser on the planet so
there are 2 workarounds 
1)use shortened name C:\Program Files becomes C:\PROGRA~1
2)use a fill character for the space e.g. C:\Program Files becomes C:\Program&nbsp;Files

 

Viel Gluck
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten
wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist
unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet
keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen
wir keine Haftung fuer den Inhalt uebernehmen.

 

> Date: Thu, 24 Jun 2010 23:17:50 +0200
> From: milu71@gmx.de
> To: user@ant.apache.org
> Subject: Re: Copying a static list of files
> 
> 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-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
 		 	   		  
_________________________________________________________________
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message