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: VB.NET implementation failing

preddy wrote:

I implemented very simple application using the VB.NET class posted and tried tu upload a text file to an SFTP server (I can connect via another SFTP client). The code fails when it can't find a log file, on this line:
If Not File.Exists(logname) Then

What code/class do you refer to?
preddy

VB.NET implementation failing

I implemented very simple application using the VB.NET class posted and tried tu upload a text file to an SFTP server (I can connect via another SFTP client). The code fails when it can't find a log file, on this line:
If Not File.Exists(logname) Then

Please advise. All I need to do is automate a daily file upload of a file matching a particular naming convention in a standard directory. .NET may be overkill, but I don't understand the explanation about Aautomating scripts - it seems to be full of holes. If I can get this working I'll gladly donate $100+

Thanks
Brent_badger

Re: Using VB.NET 2005 with the following code--Exception occurs

martin wrote:

Are you sure winscp.com can be found without specifying a full path in your setup?


That's what I was kind of wondering about. The examples on the .NET webpage didn't specify a path at all, but I couldn't tell what the error was referring to. Let me try it with the full path on my next batch run and see if that clears it up.
martin

Re: Using VB.NET 2005 with the following code--Exception occurs

Are you sure winscp.com can be found without specifying a full path in your setup?
Brent_badger

Using VB.NET 2005 with the following code--Exception occurs

Dim winscp As Process = New Process()

        winscp.StartInfo.FileName = "winscp.com"
        winscp.StartInfo.Arguments = "/log=" + logname
        winscp.StartInfo.UseShellExecute = False
        winscp.StartInfo.RedirectStandardInput = True
        winscp.StartInfo.RedirectStandardOutput = True
        winscp.StartInfo.CreateNoWindow = True
        winscp.Start()


When it executes, I get an unhandled exception saying "The system can not find the file specified" at the last line. This code was copied from the website for VB.NET automation here.

Problem is, I can't tell what file the system can not find. The data of the error says nothing.