Click here to Skip to main content
12,699,531 members (36,730 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB8.0 VB9.0 VB VB.NET
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

          'run the commands
          process.StandardInput.WriteLine("open " + _Host)
          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)

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 17:53pm

1 solution

Rate this: bad
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[^].

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 21 Nov 2012
Copyright © CodeProject, 1999-2017
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