Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# winscp upload file

  				var tofile = new FileInfo(sourceFile).Name;
                // Setup session options
                SessionOptions sessionOptions = new SessionOptions
                {
                    Protocol = Protocol.Sftp,
                    HostName = ftphostname,
                    UserName = login,
                    Password = password,
                    SshHostKeyFingerprint = ftpkey
                };

                using (Session session = new Session())
                {
                    // Connect
                    session.Open(sessionOptions);
                    var ftpFile = uploadDir + "/" + tofile;
                    session.PutFiles(sourceFile, ftpFile, true).Check();
                }
Comment

PREVIOUS NEXT
Code Example
Csharp :: migrationbuilder insert data example 
Csharp :: window height in C# forms 
Csharp :: string to array c# 
Csharp :: c# max function 
Csharp :: ignore ssl c# 
Csharp :: c# inheritance 
Csharp :: c# singleton 
Csharp :: longest substring without repeating characters 
Csharp :: SieveOfEratosthenes 
Csharp :: how to fix on Input.GetMouseButtonDown(0) conting as ui 
Csharp :: unity ui button 
Csharp :: c# optional arguments 
Csharp :: c# list remove by index 
Csharp :: convert path to uri c# 
Csharp :: loop for specific time c# 
Csharp :: c# linq select specific columns 
Csharp :: c# webapi return file 
Csharp :: C# Convert 1 range to another 
Csharp :: c# find comma in text and remove 
Csharp :: get after point in c# 
Csharp :: linq c# object except two lists 
Csharp :: monogame button 
Csharp :: get all properties of an object including children c# 
Csharp :: c sharp system pause equivelent 
Csharp :: print hello world in unity 
Csharp :: minimum of three numbers 
Csharp :: how to make a system to check if i see certain object in unity 
Csharp :: c# max sequence contains no elements 
Csharp :: unity error log 
Csharp :: c# get all occurrences of a string 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =