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: Simple one line /command to pull down a file

shcsbaker wrote:

Is it possible to save the file to a different location?

Of course, that's what the second/last argument of get command is for:
winscp SFTP://<private>:<private>@<private> /command "get /Download/BIN/BIN20081107.txt C:\target\path\" exit

https://winscp.net/eng/docs/scriptcommand_get
shcsbaker

Re: Simple one line /command to pull down a file

Is it possible to save the file to a different location?
martin

Re: Simple one line /command to pull down a file

It would help if you post output of the console.

Anyway, first obvious problem is quoting of the commands. This may work:
winscp SFTP://<private>:<private>@<private> /command "get /Download/BIN/BIN20081107.txt" exit
appdevman

Simple one line /command to pull down a file

I'm new to this client, but not new to FTP in general.

I am building a c# application that will essentially just run ONE command-line entry, to pull down a file.

This is what I have so far, but it just wont work: (I put placeholders <private> where necc)

winscp SFTP://<private>:<private>@<private> /command get /Download/BIN/BIN20081107.txt exit

Using console i get this to work fine. I can't get it to work with one simple command though.

Also, can I use a UNC path as a target path for the destination?
I assume that would be right after the file location path, before exit?

THANKS!
Klaus Heim