WinSCP.com does not parse \" escapes in the command line

Advertisement

rstarkov
Joined:
Posts:
2

WinSCP.com does not parse \" escapes in the command line

Most Windows programs understand a double quote that's escaped either by doubling it ("") or by using a backslash (\"). That's what CommandLineToArgvW understands, which is used by most standard libraries on Windows.

It seems likely that WinSCP parses the command line entirely by itself, thus introducing an incompatibility with this standard. It understands "" but not \". Can support for \" be added please?

Here's an example of a command that WinSCP can't parse:

WinSCP.com /command "open sftp://.... -hostkey=\"ssh-dss 1024 aa:bb:..:88:99\"" exit

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: WinSCP.com does not parse \" escapes in the command line

It would be a backward-incompatible change. What do you need it for?
Last edited by martin on 2015-03-19; edited 1 time in total

Reply with quote

rstarkov
Joined:
Posts:
2

Hm, you have a point. I "need" it mostly because I wasted quite a bit of time figuring out a weird "Host key does not match configured key" message, which in the end turned out to be due to this. I was passing in raw arguments to another program, which was constructing the actual command line for WinSCP by escaping " with \". I thought it could save someone else some time if WinSCP supported that.

Well, it's your call then. I realise WinSCP is used in lots of scripts around the world and breaking those would be a Bad Thing.

P.S. Random idea: there could be a WinSCP2.com wrapper that does nothing but convert the command line and pass it to WinSCP.com. Seems a bit overkill though.

Reply with quote

Advertisement

You can post new topics in this forum