Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

ITWEB

Many thanks martin, it works perfectly!
martin

Re: Automate Scripting for upload 2 files to server FTP

Just repeat the put command:
put EXAMPLE.csv
put ANOTHER.csv

To fix the warning remove the winscp.com from your command-line, it should not be there:
"C:\Program Files (x86)\WinSCP\winscp.com" /script="D:\FTP\TEST_FTP\TEST.txt"
ITWEB

Automate Scripting for upload 2 files to server FTP

Hi,
I am a new member and user to WinSCP. I am an integrator of IT solutions and I start on WinSCP, so please excuse me if my request seems trivial and simple, she has not yet for me ;)

I want to send 2 csv files to a remote ftp server, daily via a scheduled task.

I created a txt file named TEST.txt containing the following code
open ftp://username:password@IPSERVER:PORT/

lcd D:\FTP\TEST_FTP\
cd /
put EXAMPLE.csv
exit

Then I created a bat file
"C:\Program Files (x86)\WinSCP\winscp.com" winscp.com /script="D:\FTP\TEST_FTP\TEST.txt"


it works but how to 2 csv files (same location)? Warning, in the folder FTP_TEST I have other csv files not to send so I can not use the command put * .csv

Another thing when I throw the bat I have an alert "log in using a command-line parameter is deprecated. Use the "open" command instead" but sending the csv works!

Can you help me please?

Many thanks,