"synchronize local E:\Backup /home/domain/backup" ^ "open -hostkey=""ssh-rsa 2048 leave_the_key"" -rawsettings Cipher=""aes,blowfish,3des,chacha20,WARN,arcfour,des"" KEX=""ecdh,dh-gex-sha1,dh-group14-sha1,dh-group1-sha1,rsa,WARN""" ^ If you want to synchronize the folders between the remote and local machine, then you need to use synchronize local/remote/both commands. Get command examples: get file.html d:\www\ ![]() Put command examples: put file.html put d:\www\file.html The commands can be get, put or synchronize.įor example, if you want to put/upload a file to the remote directory, then the command goes as below: Step 10: Modify the line “ Your command 1” and “ Your command 2“. Step 9: Click “ Copy to Clipboard” button and paste the code in a notepad. Step 8: Select “ Script” tab and select “ Batch file” in Format field. To do that, you need to save the session with necessary username and password.Ĭaution: It’s not advised to save the password, but if you want to automatically login and transfer files, then you need to save the password. If it’s disabled, you need to enable it for automating the file transfer. Step 7: In the “ Generate Session URL/code” dialog, lookout for “ Password” check box. Step 6: Upon successful login, click Session > Generate Session URL/Code from the menu. Step 5: Login to Linux machine (remote) by enter the necessary details such as IP address, username and password. Step 4: Launch WinSCP after installing the latest version. Step 3: If you are using a older version of WinSCP, then you need to download and install the latest version. Step 2: First of all, check the version of WinSCP Writing Batch Script to Automate File Transfer from Linux to Windowsĭid I say writing a batch script? I didn’t mean actually, instead we will be using WinSCP to generate the batch script. ![]() In this tutorial, I’ll be explaining how to write a batch script to automate file transfer between Linux and Windows using WinSCP and then schedule the script using Task Scheduler in Windows.Īssumptions: I assume that the SSH server is running on a Linux machine and the local machine is Windows 10. ![]() Take a look at WinSCP’s Scripting and Automation feature. Is it possible to automate file transfer from Linux to Windows? Question: I have been running cron on a Linux server to take a backup of my website once in a day. But I download those backups to my local machine (which is Windows) once in a week or so.
0 Comments
Leave a Reply. |