WinSCPHelper 1.0.13

A library for remote server file management via SFTP. Fast, flexible, and easy to use. With a few lines, you can perform downloading and uploading of files to/from a remote location.

Install-Package WinSCPHelper -Version 1.0.13
dotnet add package WinSCPHelper --version 1.0.13
<PackageReference Include="WinSCPHelper" Version="1.0.13" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add WinSCPHelper --version 1.0.13
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

A library for uploading and downloading files from remote server via WinSCP Assembly Library. Extremely fast, flexible, and easy to use. WinSCPHelper works great on SFTP.

Getting Started

  • Right click on your project and select "Manage NuGet Package". Search for "WinSCPHelper". Install WinSCPHelper on your project.

  • Below is a sample code for downloading files from a remote directory to your local folder

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WinScpHelper;

namespace WinScpPlayground
{
    class Program
    {
        static void Main(string[] args)
        {
            WinScpConnection winScpConnection = new WinScpConnection("hostname", "sftpusername", "sftppassword");
            var currentSession = winScpConnection.Open();

            var currentList = winScpConnection.Download(currentSession, "/var/www/myremotedirectory",
                                        @"C:\mytargetfolder");

            //for verification - display names of downloaded file
            foreach (var file in currentList)
            {
                Console.WriteLine(file.FileName);
            }
        }
    }
}
  • You can also download a single file by doing this
WinScpConnection winScpConnection = new WinScpConnection("hostname", "sftpusername", "sftppassword");
var currentSession = winScpConnection.Open();
winScpConnection.Download(currentSession, "/var/www/myremotedirectory/remotefile.jpg", @"C:\mytargetfolder\localfile.jpg");
  • Here is a snippet in uploading files to your target remote directory
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WinScpHelper;

namespace WinScpPlayground
{
    class Program
    {
        static void Main(string[] args)
        {
            WinScpConnection winScpConnection = new WinScpConnection("hostname", "sftpusername", "sftppassword");
            var currentSession = winScpConnection.Open();
            winScpConnection.Upload(currentSession, @"C:\localfolderforupload\*.*", "/var/www/myremotedirectory/*.*");
        }
    }
}
  • Uploading a single file is also doable. Like so,
WinScpConnection winScpConnection = new WinScpConnection("hostname", "sftpusername", "sftppassword");
var currentSession = winScpConnection.Open();
winScpConnection.Upload(currentSession, @"C:\localfolderforupload\localfile.jpg", "/var/www/myremotedirectory/remotefile.jpg");
  • That should be it.

A library for uploading and downloading files from remote server via WinSCP Assembly Library. Extremely fast, flexible, and easy to use. WinSCPHelper works great on SFTP.

Getting Started

  • Right click on your project and select "Manage NuGet Package". Search for "WinSCPHelper". Install WinSCPHelper on your project.

  • Below is a sample code for downloading files from a remote directory to your local folder

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WinScpHelper;

namespace WinScpPlayground
{
    class Program
    {
        static void Main(string[] args)
        {
            WinScpConnection winScpConnection = new WinScpConnection("hostname", "sftpusername", "sftppassword");
            var currentSession = winScpConnection.Open();

            var currentList = winScpConnection.Download(currentSession, "/var/www/myremotedirectory",
                                        @"C:\mytargetfolder");

            //for verification - display names of downloaded file
            foreach (var file in currentList)
            {
                Console.WriteLine(file.FileName);
            }
        }
    }
}
  • You can also download a single file by doing this
WinScpConnection winScpConnection = new WinScpConnection("hostname", "sftpusername", "sftppassword");
var currentSession = winScpConnection.Open();
winScpConnection.Download(currentSession, "/var/www/myremotedirectory/remotefile.jpg", @"C:\mytargetfolder\localfile.jpg");
  • Here is a snippet in uploading files to your target remote directory
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WinScpHelper;

namespace WinScpPlayground
{
    class Program
    {
        static void Main(string[] args)
        {
            WinScpConnection winScpConnection = new WinScpConnection("hostname", "sftpusername", "sftppassword");
            var currentSession = winScpConnection.Open();
            winScpConnection.Upload(currentSession, @"C:\localfolderforupload\*.*", "/var/www/myremotedirectory/*.*");
        }
    }
}
  • Uploading a single file is also doable. Like so,
WinScpConnection winScpConnection = new WinScpConnection("hostname", "sftpusername", "sftppassword");
var currentSession = winScpConnection.Open();
winScpConnection.Upload(currentSession, @"C:\localfolderforupload\localfile.jpg", "/var/www/myremotedirectory/remotefile.jpg");
  • That should be it.

Release Notes

Essential features of this package is included. Basic downloading and uploading of files(SFTP) via WinSCP

Dependencies

This package has no dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.13 24,450 12/3/2017
1.0.9 318 12/3/2017
1.0.8 326 12/2/2017