Program A(cmd.exe \C) (Takes 1 argument)
Program B: (Takes 1 or more arguments)
C1,C2,C3, … : A list of agruments
If I type A B C1 C2 C3 in cmd prompt,
The desired interpretation is
A (B (C1 C2 C3)) (C is the arguments to B, B is the argument to A)
But NOT AS A (B) (C1) (C2) (C3) (B,C1,C2, C3, …. are arguments to A)
How should I escape / redirect/pipe in cmd prompt?
Thanks in advance
According to Microsoft’s documentation, you can use the
|operator for pipes.And you will need to rewrite your command as:
Hope this helps.
UPDATE
since you updated your question, I guess you are trying to do something like:
you can escape special characters with
^or try to quote the string like this:
UPDATE 2
If you are having problem with
cmd.exe /Cand quotes (e.g. B, C1, C2, C3 contains space), you should enclose the whole command with another pair of quotesFYI, in the
Processing quotation markssection in Microsoft’s documentation on cmd.exe:You may want to read Syntax : Escape Characters, Delimiters and Quotes too: