On Thu, Oct 22, 2009 at 13:27, Rohit P <[email protected]> wrote:
> Hi,
>
> I have a requirement to execute a program that uses a path as an argument.
> The path argument is set using <property> task.
>
> <property name="SpaceVar" value="C:/Program Files"/>
>
> <target name="EchoVar">
> <echo> SpaceVar = ${SpaceVar} </echo>
> <exec dir="${basedir}" executable="cmd.exe" failonerror="true">
> <arg line="/c dir ${SpaceVar}"/>
> </exec>
>
> </target>
>
> After execution of the above snippet i am getting the below error:
>
Don't use <arg line="">, as it will split the line attribute with spaces.
Use:
<arg value="/c"/>
<arg value="dir"/>
<arg value="${SpaceVar}"/>
--
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
[email protected]
40 avenue Raymond Poincaré
75116 Paris
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]