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
3
votes
1 answer

"Host key wasn't verified" despite having added -hostkey switch to WinSCP command-line

I am trying to make a SFTP connection using SSIS Execute process task with below command line arguments. /log=G:\USER_DATA\USER_USER_SYNC\SFTP_LOG\user_sync_winscp.log /command "open sftp://username:password@stransfer.host.com/" "get…
vikrant rana
  • 4,509
  • 6
  • 32
  • 72
3
votes
2 answers

From Python run WinSCP commands in console

I have to run a few commands of WinSCP from a Python class using subprocess. The goal is to connect a local Windows machine and a Windows server with no FTP installed and download some files. This is what I tried python proc =…
Diego
  • 33
  • 1
  • 1
  • 3
3
votes
1 answer

How to run a WinSCP from ps1 file

I have a .ps1 file with my script. In this script I have a line with: Start-Process "C:\activatebatch.bat" If i execute it directly with ps1 file, everything works well. But if I set up a Windows Scheduler with ps1 as executive, the bat file…
Renver
  • 77
  • 1
  • 6
3
votes
2 answers

Add Visual Studio Code editor as a default editor in WinSCP when edit/view files in Ubuntu

How to add Visual Studio Code editor as a default editor in WinSCP, when edit/view files.
Patel Nitesh
  • 53
  • 2
  • 12
3
votes
1 answer

Perl - Win32::OLE::const error

I’m trying to use WinSCP for SFTP with a Perl script. I’m pretty much using the code off of the WinSCP site verbatim. But I’m getting the following error: Win32::OLE::CONST->Load: No or invalid type library name at test.pl line 12.…
Cory Kleiser
  • 1,969
  • 2
  • 13
  • 26
3
votes
2 answers

How to delete files older than x days from SFTP server in PowerShell

The below PowerShell script connects to my SFTP sever and deletes all my files under the path /test/my_file/. Is there a way where I can say only delete files that is five days old under the path /test/my_file/. Add-Type -Path "…
rich dave
  • 57
  • 1
  • 7
3
votes
1 answer

"Host key does not match configured key" when connecting to SFTP server with WinSCP .NET assembly

I'm having some trouble while trying to implement an SFTP connection via C#. At the moment I can connect using WinSCP with my host, port, login, password and the key file (ppk file). My implementation is just like this using WinSCP…
briba
  • 2,857
  • 2
  • 31
  • 59
3
votes
1 answer

A WinSCP script to download, rename, and move files

Disclaimer #1: I posted this question on the WinSCP's forum but haven't received any replies and this issue is time-sensitive.Disclaimer #2: I'm basing the legitimacy of this cross-post on advice found on the subject from Meta.With that…
Eliezer
  • 429
  • 1
  • 9
  • 20
3
votes
1 answer

Watch for changes in local folder and upload them to SFTP server

Linux user here trying to write a script in PowerShell to automate SFTP transfers from a Windows server to a remote server. I have everything working for the most part (though I still have some testing to do). My current issue is after the script…
pskz134
  • 31
  • 1
  • 5
3
votes
1 answer

Copy files to FTP and archive with today's date

I need to create a script that does the following: Copies all files in a folder to an FTP site. If the copy was successful move the files to an archive. The archive should be a freshly created folder with today's date (so we know when they were…
SysAdminUK
  • 37
  • 1
  • 6
3
votes
2 answers

how transfer files from windows machine to qemu (raspberry pi emulator)?

I'm using qemu as my raspberry pi emulator. I use IDE for writing my codes in windows and I am having a hard time in transferring files every time from my windows to qemu. I tried using winscp, but it did not allow me to connect using default…
appsdownload
  • 751
  • 7
  • 20
3
votes
1 answer

Multiple file mask for WinSCP Session.EnumerateRemoteFiles

I'm rebuilding the FTP portion of a system monitor app, has to be able to download any file that is: .csv .xlsx .xls and when I try to setup that mask, its returning 0 files, but if I pick just one of them, it works perfectly. string FileMask =…
Eman
  • 1,093
  • 2
  • 26
  • 49
3
votes
1 answer

Prevent incomplete file transfer over FTP using WinSCP .NET Assembly

I am simply trying to transfer text files from one FTP server to another using a windows service. I download the required files from source FTP server and save it locally on my system and then upload the saved file to the destination server. For…
Jordan
  • 713
  • 15
  • 30
3
votes
1 answer

Fail SSIS task when the mask to select files to be uploaded to FTP server using WinSCP matches no files

I'm creating a SSIS package that uses a script task (via WinSCP) to upload a file to an FTP. The upload works fine, however I need the process to fail if there is no file uploaded (currently it just loops through and passes a success) - Haven't had…
user8023823
3
votes
2 answers

Cancel file transfers while transferring file to destination

I have used Winscp for file transferring and got details file transfer progress like below link, File transfer details binding continuously until file transfered in window using WPF and transfer code link…
Arun D
  • 279
  • 3
  • 18