Questions tagged [winscp]

WinSCP is an open source free SFTP, FTP and SCP client for Windows. WinSCP is commonly used by developers to upload their code, such as PHP, to web servers. Beyond this, WinSCP offers scripting and .NET assembly to automate file transfer tasks.

WinSCP is an open source free SFTP, FTP, WebDAV and SCP client for Windows. Its main function is file transfer between a local and a remote computer.

WinSCP is commonly used by developers to upload their code, such as PHP, to web servers.

WinSCP can be used to automate file transfer tasks, either using basic scripting interface or, for advanced tasks, using .NET assembly.

For details see:

For questions specific to the WinSCP .NET assembly, in addition to the main tag use also the .

1060 questions
4
votes
1 answer

How to download a single file using Session.GetFiles in WinSCP C#

So, basically I am trying to download only one file from the entire folder on my server. Folder "domain" contains those files right now: File1.txt File2.txt File3.txt So, as I can see in WinSCP docs if I want to download only one file I still…
Stas Mackarow
  • 175
  • 2
  • 5
  • 16
4
votes
1 answer

How to access nextcloud files in C# by using WebDav?

When trying to access the WebDav API of nextcloud via WinSCP, I am facing several problems with the right usage of root folder, remote path, etc. To save others some time, here is the working code I came up with to upload a file into a remote…
CodeMonga
  • 105
  • 1
  • 7
4
votes
2 answers

PowerShell SFTP Download without Writing Files to Disk

I am trying to use PowerShell to Sync Payroll files stored on SFTP to SharePoint. I have most of the code written, the only thing I can't figure out is if there is a way to avoid temporarily downloading the file to the disk. Given the sensitivity of…
Eric Weintraub
  • 967
  • 1
  • 10
  • 23
4
votes
2 answers

Is there a good way having two SQL Server Databases on Different machines synched daily?

What i would like to achieve is have two different SQL Server Databases, on two different servers running the same SQL Server Version( SQL Server 2008 R2 RTM - 10.50.1600.1 ) to be synched daily. Synched meaning just transferring the new data ( or…
4
votes
1 answer

aws ec2 as login as root on WinSCP - Received too large (... B) SFTP packet. Max supported packet size is 102400 B

I wanted to upload my edited file anywhere in the server so im looking a way to login as root in WinSCP. I tried to login as root in WinSCP with my aws-ec2 credentials and it keep responding with an error message of Received too large (... B) SFTP…
superern
  • 129
  • 1
  • 9
4
votes
2 answers

"Cannot execute script because the script entry point is invalid" error in script task in SSIS

I am trying to upload files from my local folder to SFTP using SSIS Script Task. On replicating the script from https://winscp.net/eng/docs/library#csharp I get an error Error: Cannot execute script because the script entry point is invalid.…
mehtat_90
  • 586
  • 9
  • 29
4
votes
3 answers

Preserve new line characters when editing remote file from WinSCP

As I understand, it is that if I create a file on my Solaris server I will automatically get LF ending line. Setup: I am logged on to a Windows server remotely (with no internet as long as I am connected to it). On this Windows server I am using…
ITguy
  • 847
  • 2
  • 10
  • 25
4
votes
2 answers

Code to download file from FTP with WinSCP .NET assembly does not connect, but I can connect in WinSCP GUI

I need to download a file from FTP thru WinSCP .NET assembly. I have this code currently but the error says Authentication failed. try { SessionOptions sessionOptions = new SessionOptions { Protocol = Protocol.Ftp, HostName…
theo
  • 279
  • 1
  • 3
  • 17
4
votes
1 answer

Sending files over FTPS (secure) using WinSCP .NET assembly

What is required to send out files to a server with WinSCP (.NET assembly) using FTPS (Secure)? I've been looking at their documentation and am not really clear on certain aspects like TlsHostCertificateFingerprint or TlsClientCertificatePath.…
Newbie
  • 157
  • 4
  • 15
4
votes
3 answers

Creating a folder according to today's date and copying files into the new folder using batch files

I have the following code that creates a folder based on today's date and moves the file from a folder to the new one. I have the following code: set date="%date:~7,2%%date:~4,2%%date:~10,4%" set mydir=%date% cd "C:\Users\rnan\Desktop\Batch…
qwerty
  • 887
  • 11
  • 33
4
votes
4 answers

Convert a batch-file command with complex arguments to PowerShell

I have the following in .bat that is (this works): "%winscp%" /ini=nul ^ /log=C:\TEMP\winscplog.txt ^ /command "open scp://goofy:changeme@10.61.10.225/ -hostkey=""ssh-rsa 2048 d4:1c:1a:4c:c3:60:d5:05:12:02:d2:d8:d6:ae:6c:5d"""…
Be Kind To New Users
  • 9,672
  • 13
  • 78
  • 125
4
votes
2 answers

Using VBA to run WinSCP script

I am able to download files from SFTP in CMD window, by using following code: WinSCP.com # Connect to the host and login using password open user:pw@address # get all the files in the remote directory and download them to a specific local…
NewGuyComesIn
  • 189
  • 1
  • 2
  • 14
4
votes
1 answer

WinSCP .NET assembly SynchronizeDirectories: Upload of file ... was successful, but error occurred while setting the permissions and/or timestamp

I am using WinSCP .NET Assembly in PowerShell for file synchronization with a SFTP server. I am using the following code for synchronization: http://winscp.net/eng/docs/library_session_synchronizedirectories#powershell Problem is, when this script…
cloudify
  • 95
  • 4
  • 10
4
votes
3 answers

SSIS C# 2012 Script Task referring WinSCPnet.dll fails when run from SQL Server Agent with "Exception has been thrown by the target of an invocation"

I have an SSIS package (created in VS 2013) that contains a C# 2012 Script Task. The job of the script task is to download a file from an SFTP server using WinSCP .NET assembly and place it on my server (Windows Server 2012 R2 with SQL Server…
4
votes
1 answer

Execute Process Task in SSIS to copy file from remote to local using WinSCP executable

I have a file StockExchangeData.txt in my remote server. I am trying to get it to my local drive C:\User\KD\ExchangeData using WinSCP (FTP). In my SSIS, I have an "Execute Process Task". In its Process tab, I am using Executable as C:\Program Files…
Kuldip.Das
  • 191
  • 1
  • 3
  • 13