Topic "Having trouble running from .net application"

Author Message
daforga
[View user's profile]

Joined: 2011-05-26
Posts: 1
I have been using a .bat to run WinScp to download from a ftp site which works fine. The line in the .bat file is : winscp.exe /script=FMCSADownLoad.txt
FMCSADownLoad.txt reads:
open riviera@fileserv.fmcsa.dot.gov
get *.txt
exit

A new requirement is that I put this process into the body of my .net application.

I have tried:

Process winscp = new Process();
winscp.StartInfo.FileName = "C:\\FMCSA_Upload\\winscp.com";
winscp.StartInfo.UseShellExecute = false;
winscp.StartInfo.CreateNoWindow = true;
winscp.StartInfo.RedirectStandardInput = true;
winscp.Start();
winscp.StandardInput.WriteLine("open riviera@fileserv.fmcsa.dot.gov");
winscp.StandardInput.WriteLine("get *.txt");
winscp.StandardInput.WriteLine("exit");

This does not work. Can anyone guide me to a way to run an existing session from a .net application?

Thanks
Dave
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Sorry, your post does not include enough information.

Please read how to troubleshoot problems with WinSCP. If it turns out that you are not able to help yourself, read how to ask for support or report bugs efficiently, so others can help you.

Anyway, these link may help you:
http://winscp.net/eng/docs/faq_scheduler
http://winscp.net/eng/docs/guide_dotnet
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License