I'm using plink
on a windows 7 desktop to create a folder a on windows 2008 server.
The server uses pragmaSSH to allow the SSH connection and everything works just fine there.
The directory I want to create has a space in it and that is where my problem starts.
I have a basic plink
command that works like this
plink.exe -i privatekey.ppk user@server cmd.exe /c mkdir "c:\asdfasdf"
but changing that command to this fails. so the space is for sure my issue.
plink.exe -i privatekey.ppk user@server cmd.exe /c mkdir "c:\asdf asdf"
I've tried to escape this in every possible way I can think off and always get the same problem with the space.
Ok after 60000 tries i figured out how to pass the quotes to the server.
plink.exe -i privatekey.ppk useryserver mkdir \\"""c:\asf asf\\"""
and that sent the 1 quote on each side and ran the command as mkdir "c:\asf asf"