Howdy folks,
This from the exec doc:
<!-- not tested -->
<target name="help">
<exec executable="cmd">
<arg value="/c"/>
<arg value=""dir;cls;set;cls;"/>
</exec>
</target>
I would recommend that you read the dos "man" pages on cmd start and call, they
are quite useful. Pay close attention to the /c /k and /s options if you are
passing multiple commands and quotes are necessary.
Cmd /? Yields a wealth of info, I've found the following snippet is
particularly useful:
If /C or /K is specified, then the remainder of the command line after
the switch is processed as a command line, where the following logic is
used to process quote (") characters:
1. If all of the following conditions are met, then quote characters
on the command line are preserved:
- no /S switch
- exactly two quote characters
- no special characters between the two quote characters,
where special is one of: &<>()@^|
- there are one or more whitespace characters between the
the two quote characters
- the string between the two quote characters is the name
of an executable file.
2. Otherwise, old behavior is to see if the first character is
a quote character and if so, strip the leading character and
remove the last quote character on the command line, preserving
any text after the last quote character.
-----Original Message-----
From: Sayed, Irfan (Irfan) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 18, 2007 9:07 AM
To: [email protected]
Subject: Execution of windows command in ant's build.xml
Hi All,
Need to execute windows 'cls' command in the Ant's build.xml file.
Can somebody please help.
Regards
Irfan.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]