destination directory has spaces in name

Advertisement

krypto69
Joined:
Posts:
2

destination directory has spaces in name

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:
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

Reply with quote

Advertisement

krypto69
Joined:
Posts:
2

got it

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

Reply with quote

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

Re: destination directory has spaces in name

put -nopermissions -nopreservetime "\\WSIPR2\GSAP\ULTIPRO\EXPORT\Delta\*.txt" "/home/G4S Government Solutions/"
(note the slash at the end of remote path)

Reply with quote

Advertisement

You can post new topics in this forum