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: Having Problems with GET from command line

You need to use "open" command before "get".
See example.
cdun2

Having Problems with GET from command line

I'm trying to understand how to GET and PUT files from an SFTP site with WinSCP using without using the GUI, and I'm not having much luck.

From the GUI, in order to log in to our SFTP site, I do this:

Host name: sftp.sftpserver.net
Port Number: 21
User name: internaluser
Password: internalPassword
File protocol: SFTP
Allow SCP fallback: (true)

from there, the files I need reside at /statefiles/import

I've tried this from the command prompt:

C:\ cd c:\Program Files
C:\Program Files>WinSCP\WinSCP.com /command "get newfile.csv /statefiles/import/" "exit"

What I get back is 'No Session'

How do I do this correctly?

Thanks.