Is there any way where we can develop a script that would run on Windows and FTP files from Windows local machine to a Linux server.
I'm not interested in using third party tools like FileZilla or WinSCP at the moment.
Is there any way where we can develop a script that would run on Windows and FTP files from Windows local machine to a Linux server.
I'm not interested in using third party tools like FileZilla or WinSCP at the moment.
On Windows 10 version 1803 or newer, there's sftp.exe
built in (from Microsoft build of OpenSSH for Windows). On older versions of Windows 10, it can be installed as an optional Windows feature. On older versions of Windows, you can just extract the ssh.exe
from a .zip (latest release), no installation is need.
There's not even any built-in language in Windows that supports SFTP. Neither batch file, PowerShell, JScript nor VBScript support the SFTP natively. You would have to install SFTP library.
Some languages do support SFTP natively (PHP for instance), but you have to install these.
Using a 3rd party tool like WinSCP is more straightforward.
See an introduction to scripting with WinSCP.
See also What's a decent SFTP command-line client for windows?
FileZilla does not support scripting:
How to send a file with FileZilla from command line?