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

Litestream

As above

Ok I've figured it out. Should be open sftp://user:password@xx.xx.xx.xx
Litestream

As above

I get the text "host does not exist" on my command screen when I run the above
Litestream

Scrip assistance please

I found this function on MSDN forums which is called from Excel:

Dim strQuote As String
strQuote = Chr(34)
Dim strSFTPDir As String
strSFTPDir = "c:\program files (x86)\winscp\"
Dim strCommand As String
strCommand = "/script=c:\test\abc\WinSCPGet.txt"
Call Shell(strSFTPDir & "winscp.com " & strQuote & strCommand & strQuote, vbNormalNoFocus)


The WINSCPGet.txt file contains the following:


# Connect to the host and login using password
open sftp://user:password.host.com
# Change the remote directory
cd /home/from/
# get all the files in the remote directory and download them to a specific local directory
get *.* c:\test\from\
# remove the files from the remote direcory
rm *.*
# Close and terminate the session
exit


I don't have a host name for my SFTP site, just an IP address so I changed the first line to open sftp://user:password.xx.xx.xx.xx but this does not seem to work

Any ideas how to fix this please?