Topic "Error downloading file in in directory"

Author Message
sebasv
[View user's profile]

Joined: 2012-10-18
Posts: 3
Location: The Netherlands
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.

Quote:

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
debug.txt (27.55 KB) [Download]

Description: (none)

session.txt (8.96 KB) [Download]

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
First, make sure you are using forward slashes for remote file.
_________________
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