On 6/22/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I need to include quotation marks (" ") in a command line parameter
> being passed to an exec command. How should I escape the character in
> the command line?
>
> Cheers,
> James.
James,
You can insert quotes into arguments using the pre-defined xml entity "
If you are just escaping spaces in a phrase that you want to be a
single argument, then you don't need to insert your own quotes (Note
that arguments that contain quotes " will not be escaped in this way):
<exec program="do_something.exe">
<arg value="-v" />
<arg value="parameter with space" />
<arg value="another parameter" />
<arg value="-x" />
<arg value="already "quoted"" />
</exec>
The above will execute the following command (in 0.85 RC2/3):
do_something.exe -v "parameter with space" "another parameter" -x
already "quoted"
The file attribute will let you specify platform-independent absolute
file paths... in CVS, I think there is a similar dir attribute.
http://nant.sourceforge.net/release/latest/help/tasks/exec.html
Regards,
--
Troy
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Nant-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users