I am new to WinSCP but i hope it will be the tool i need for a task i have.
I need a script to automatically connect to a ftp server each night and upload CSV files to two folders.
The files will be named something like Fakturor_20191129.csv and betalningar_20191129.csv.
The files starting with fakturor must be uploaded to a folder called reminder, and betalningar to a folder called payment.
I have written the following script and created a task in task scheduler, but it is not working so i am obviously doing something wrong.
I would also like the script to download all the files in another folder on the server, delete them, and then download them to E:\Root\Apps\Winbas\foobar\foobar.
Any help would be appreciated.
open ftp://user:firstname.lastname@example.org/ cd /reminder put E:\Root\Apps\Winbas\foobar\Fakturor\fakturor*.csv exit open ftp://user:email@example.com/ cd /payment put E:\Root\Apps\Winbas\Wbserv\foobar\Fakturor\betalningar*.csv exit # Kör skriptet med ett kommando som: # "C:\Program Files (x86)\WinSCP\WinSCP.exe" /log="C:\ftp\WinSCP.log" /ini=nul /script="C:\ftp\sync.txt"