This is an old revision of the document!

WinSCP .NET Assembly

WinSCP .NET Assembly winscp.dll is C# wrapper around WinSCP scripting intnerface that allows connecting to a remote machine and manipulating remote files over SFTP, SCP or FTP session from .NET applications.

Advertisement

Using WinSCP .NET Assembly

First, you need to create an instance of WinSCP.SessionOptions class and fill in all necessary information to allow an automatic connection and authentication of your session.

Then you create an instance of WinSCP.Session class. Optionally you hook handlers of some events of the class. Then you open the session using Session.Open method, passing instance of your WinSCP.SessionOptions.

Once the session is opened, you can use any of the method of WinSCP.Session to manipulate remote files. For example use Session.GetFiles to download files, Session.PutFiles to upload files or Session.SynchronizeDirectories to synchronize directories.

Classes

Class Description
ChmodArgs Provides data for change of permissions event.
FailedArgs Provides data for Session.Failed event.
OperationResult Represents results of batch operation.
Permissions Represents *nix-style remote file permissions.
RemoveArgs Provides data for remote file removal event.
RemoteFileInfo Represents data about remote file.
Session Represents session. Provides methods for manipulating remote files.
SessionException Exception associated with the Session.
SessionOptions Defines information to allow an automatic connection and authentication of the session. Is used with Session.Open method.
SynchronizeResult Represents results of synchronization, Session.Synchronize.

Advertisement

Last modified: by martin