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

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
krypto69

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