Topic "Copy a directory with a space in its name"

Author Message
moshikofeldman
[View user's profile]

Joined: 2009-09-30
Posts: 1
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!
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
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/"

Last edited by martin on 2009-10-07; edited 1 time in total
moshikofeldman2

Guest


appreciate your help.
Apurva

Guest


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'
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
First make sure you use the latest version. Then, the double-quoting does not work with winscp.com yet. See tracker.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License