Topic "destination directory has spaces in name"

Author Message
krypto69
[View user's profile]

Joined: 2012-12-18
Posts: 2
Hi,

I have the script file below. It connects to the remote SFTP site but gives the error:

"Cannot overwrite remote file '/home/G4S Government Solutions'.

I think my syntax is incorrect around the destination folder (because it has spaces?)

Here's my script file:
Code:
option batch on
option confirm off
open sftp://<edited_by_admin>:22 -hostkey="ssh-dss 1024 37:61:2d:68:24:65:39:88:c6:46:53:19:42:66:4f:64"
put -nopermissions -nopreservetime "\\WSIPR2\GSAP\ULTIPRO\EXPORT\Delta\*.txt" "/home/G4S Government Solutions"
exit
krypto69
[View user's profile]

Joined: 2012-12-18
Posts: 2
the answer was :

option batch on
option confirm off
open sftp://<edited_by_admin>:22 -hostkey="ssh-dss 1024 37:61:2d:68:24:65:39:88:c6:46:53:19:42:66:4f:64"
cd "/home/G4S Government Solutions"
put -nopermissions -nopreservetime \\WSIPR2\GSAP\ULTIPRO\EXPORT\Delta\*.txt
close
exit
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Code:
put -nopermissions -nopreservetime "\\WSIPR2\GSAP\ULTIPRO\EXPORT\Delta\*.txt" "/home/G4S Government Solutions/"

(note the slash at the end of remote path)
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