Topic "Error downloading file in in directory"

Author Message
[View user's profile]

Joined: 2012-10-18
Posts: 3
Location: The Netherlands

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"

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

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

End Using
debug.txt (27.55 KB) [Download]

Description: (none)

session.txt (8.96 KB) [Download]

Description: (none)

[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26330
Location: Prague, Czechia
First, make sure you are using forward slashes for remote file.
Martin Prikryl

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License