Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB8.0 VB9.0 VB.NET
Hi,
In my program(console program), I using WinSCP ver. 4.3.8 to upload and download file in a SFTP site/server.
below is my code:
Dim _Host As String = AppSettings.Get("sftp_Host")
          Dim _UserName As String = ReturnValue(oSFTPConStr.GetValue(1))
          Dim _Password As String = ReturnValue(oSFTPConStr.GetValue(2))
          Dim _InboxPath As String = AppSettings.Get("sftp_inFolder")
          Dim _Port As String = AppSettings.Get("sftpPort")
 
          Dim nPath As String = AppSettings.Get("sftp_Folder")
          Dim nName As String = AppSettings.Get("cTextFileName")
 
          'create the required startinfo for program to run in background.
          Dim startInfo As New ProcessStartInfo
          startInfo.FileName = _winScppath
          startInfo.RedirectStandardInput = True
          startInfo.RedirectStandardOutput = True
          startInfo.UseShellExecute = False
          startInfo.CreateNoWindow = True
          startInfo.WindowStyle = ProcessWindowStyle.Hidden
 
          'create the process object.
          Dim process As New Process
          process.StartInfo = startInfo
          process.Start()
 
          'run the commands
          process.StandardInput.WriteLine("open " + _Host)
          process.StandardInput.WriteLine(_UserName)
          process.StandardInput.WriteLine(_Password)
          Dim ans = process.StandardOutput.ReadLine
          While ans <> Nothing
              If ans.Contains("Session started.") Then
                  ans = ans
                  Exit While
              End If
              ans = process.StandardOutput.ReadLine
          End While
          process.StandardInput.WriteLine("cd " + _InboxPath)
          process.StandardInput.WriteLine(" get " + _InboxFile & " " & _LocalInbox)
          process.StandardInput.Close()
          process.WaitForExit(1)
 
the program runs on a Job Scheduled task, and were using ASG-Zena to create scheduled run. Zena is a job scheduler.
 
How can i run my program using Zena Job scheduler ? PLEASE Help Me.
Posted 21-Nov-12 16:53pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Ask your question with the people who wrote the library. You paid good money for the library and support came with it, use it[^].
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web01 | 2.8.141022.2 | Last Updated 21 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100