Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Similar problem but with hostkey

First make sure you use the latest version. Then, the double-quoting does not work with winscp.com yet. See tracker.
Apurva

Similar problem but with hostkey

I am using the following command:
>winscp.com /command "open username:pwd@host:22 -hostkey="ssh-dss 1024 b0:ed:e0:fg:cd:55:f6:6c:cf:ff:70:ed:68:bc:3e:1c""

It first does not take the hostkey and give me
Unknown command '1024'.
Unknown command 'b0:ed:e0:fg:cd:55:f6:6c:cf:ff:70:ed:68:bc:3e:1c'

I've tried doubling the quotes like this
>winscp.com /command "open username:pwd@host:22 -hostkey=""ssh-dss 1024 b0:ed:e0:fg:cd:55:f6:6c:cf:ff:70:ed:68:bc:3e:1c"""

and I get the error - too many parameters for command 'open'
moshikofeldman2

Thanks a lot!

appreciate your help.
martin

Re: Copy a directory with a space in its name

Double them.
And make sure you open the session using open command as well.
winscp.exe /console /command "open myuser:mypass@1.2.3.4" "put ""d:\my test"" /root/Desktop/"
moshikofeldman

Copy a directory with a space in its name

Hi,
I'm trying to use the following command to copy a folder from a Windows machine to Linux:
source: d:\my test
target: /root/Desktop

> winscp.com myuser:mypass@1.2.3.4 /command "put d:\my test /root/Desktop/"
(It is important to say that the same command works with a simple source folder name, such as d:\test)

it fails, of course, and reports that the folder "d:\my" doesn't exist.

I've tried some variations, such as
> winscp.com myuser:mypass@1.2.3.4 /command "put \"d:\my test\" /root/Desktop/"

but none of them works. How can I quote the source folder name inside a put command, in order for it to be understood correctly?

Thank you!