Passing double quotes to DOS

Пётр Б.
Sun May 3 20:21:00 GMT 2015

cygwinDOTcom/ml/cygwin/2002-02/msg00336.html   (Gmail keeps setting my
message type to HTML. Cannot get it to be plaintext if there is a link
inside the message)

There was a statement saying that cygwin does everything to preserve
double quotes.

It does not. I was recently doing some symbolic links with "cmd /c
mklink "path" "filename" " recently and it was fine until I had a file
with ampersand.

If I type
cmd /c mklink "path" "filename"

cmd.exe is called without doubleqoutes (I use ProcExp to see cmd line).

If I type same thing in "Run" dialog of TaskManager, doublequotes are
passed as intended.

If I type
cmd /c mklink \"path\" \"filename\"

reverse slash spills to cmd line.

If I type
cmd /c mklink "\"path\"" "\"filename\""

reverse slash and all doubleqoutes spill to cmd line.

I really do not get it. How do I pass doubleqoutes to CMD? Problem is
not related to mklink or any internals of CMD and even bash - Cygwin
does not pass doubleqoutes instead.

echo "\"bbb\""
cmd /c echo "\"bbb\""

There must be an error somewhere on the CYGWIN/Windows boundary.

Can I somehow whitelist "cmd.exe" so it does not get special treatment?

CYGWIN_NT-6.1 USER 1.7.33-2(0.280/5/3) 2014-11-13 15:47 x86_64 Cygwin

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list