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

JMcClane

Problem with Session.PutFilesToDirectory Method

Hi,
I'm new to this forum, and first to say, I'm not a .NET developer.
I use the assembly as addin in our ERP system development (Dynamics NAV).

My code looks about this, I hope you can read it. NAV has different notation than .net languages
WinSCPTransferResults := WinSCPSession.PutFileToDirectory(LocalFileFullPath, RemoteDirectory, DeleteLocalFileAfterTransfer, WinSCPTransferOptions);

Success := WinSCPTransferResults.IsSuccess;

WinSCPTransferResults is WinSCP.TransferOperationResult.
Success is a boolean.

This code results in an error like this (translated from german):

Error on call of WinSCP.TransferEventArgs.get_IsSuccess with the following message:
The type of at least one argument not matching the parameter type of the method.

the error occurs on the second line, where I try to get the success info.

If I use the method WinSCPSession.PutFiles instead, it works.

Has anybody an idea what I'm doing wrong here?

Greetings.