Passing double quotes to DOS

cyg Simple cygsimple@gmail.com
Tue May 5 14:47:00 GMT 2015


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


Where is that statement?

> 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.
> 

It isn't Cygwin but the shell semantics that parse the double quotes.

> If I type
> cmd /c mklink "path" "filename"
> 
> cmd.exe is called without doubleqoutes (I use ProcExp to see cmd line).
> 

Because the shell (e.g. bash) processes the data within the quotes; that isn't Cygwin and would happen in any *NIX shell.  Use:

cmd /c mklink '"path"' '"filename"'

instead.  Note the ' before and after (dependent on left or right values) the ".

--
cyg Simple


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list