Error using GetFiles

Advertisement

Advertisement

canuszczyk
Joined:
Posts:
2
Location:
Georgia, USA

sebasv wrote:

Same as mine 1 hour earlier.
I tried to search the forum......

I kind of got it to work. I ended up changing folders on the remote end using the session.executecommand method to call CWD. Then I had to get a list of files in the folder. I was then able to get files. Not sure why, but this works.

Reply with quote

sebasv
Joined:
Posts:
3
Location:
The Netherlands

Using CWD works yes, thanks.
Im not using double folders so i can do this with:


Dim Path() As String
Dim SourceFile As String
If source.Contains("/") Then
Path = source.Split("/")
SourceFile = Path(1)
Dim command As String = "CWD" & Path(0)
session.ExecuteCommand(command)

Else
SourceFile = source
End If

Dim transferResult As TransferOperationResult
transferResult = session.GetFiles(SourceFile, dest)

Reply with quote

Advertisement

You can post new topics in this forum