Error downloading file in in directory

Advertisement

sebasv
Joined:
Posts:
3
Location:
The Netherlands

Error downloading file in in directory

Hello,

im having a problem with the DLL + Exe in VB 2010 (Express).
I can download a file without a problem as long as its in the home directory.
As soon as i put it in a directory it fails with an exception: can not get attributes, file not found.
Tested with FreeNAS ftp server and Local Filezilla server.

Dim sessionOptions As New SessionOptions
With sessionOptions
.Protocol = Protocol.Ftp
.HostName = "localhost"
.UserName = "support"
.Password = "password!"
End With
Using session As Session = New Session
session.ExecutablePath = Application.StartupPath & "\Tools\WinSCP.exe"
session.DebugLogPath = "c:\debug.txt"
session.SessionLogPath = "c:\session.txt"
session.Open(sessionOptions)

Dim transferOptions As New TransferOptions
transferOptions.TransferMode = TransferMode.Binary

Dim transferResult As TransferOperationResult
transferResult = session.GetFiles("\testje\update.txt", "C:\Test\Document.txt")

transferResult.Check()
End Using

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,540
Location:
Prague, Czechia

Re: Error downloading file in in directory

First, make sure you are using forward slashes for remote file.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum