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

alberto_grcia

Re: Passing several parameters to script

Ok, solved. As I said it was to be my fault; I was mixing data of several accounts, so the script works well; it was the data I was passing what was wrong.
alberto_grcia

Passing several parameters to script

I've search through all the posts but still can't figure out what I'm doing wrong (I assume it's my fault, but don't know why).

I just want to be able to pass the FTP URL, user and password as parameters to the script; this is how I'm doing it:

On console, I type:
winscp_batch.bat ftp_url ftp_user ftp_password

(ftp_url would be anyftp.com (without quotes), etc.)

On the .bat I have:
C:\Apps\WinSCP\winscp.com /script=c:\scripts\ftp_script.txt /parameter %1 %2 %3


And in ftp_script.txt I have:
option batch continue
option confirm off
open ftp://%2%:%3%@%1% -explicittls
lcd...
...

It works well if I use only 1 parameter, but I can't have it working with 2 or 3 parameters.

Could someone please help me finding whay I'm doing wrong?
Thanks.

(please excuse my english; it's not my native language)