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

Guest

Re: Parametrized script help

The script:

open %1%

put \\Files\Upload\*.jpg
exit



I found where the problem is, I forgot to take off "/" from the script
Now works perfectly, thank you.

Best regards.
Guest

Re: Parametrized script help

martin wrote:

In this particular case, you can make the path part of the URL:

"C:\Program Files (x86)\WinSCP\winscp.com" /script=D:\Script\script.txt /parameter ftp://user:pass@server1.com/

...
"C:\Program Files (x86)\WinSCP\winscp.com" /script=D:\Script\script.txt /parameter ftp://user:pass@server5.com/some/path/


Note the /some/path/.

The script:

open %1%

put \\Files\Upload\*.jpg
exit


(i.e. no second argument of the put)



Hello Martin,

Thanks for your reply.
I tried as you wrote. However, regardless of the path that I have added on the end, upload files to the root.

("C:\Program Files (x86)\WinSCP\winscp.com" /script=D:\Script\script.txt /parameter ftp://user:pass@server5.com/some/path/)

Do you have any other idea?

Thank you in advance.
martin

Re: Parametrized script help

In this particular case, you can make the path part of the URL:

"C:\Program Files (x86)\WinSCP\winscp.com" /script=D:\Script\script.txt /parameter ftp://user:pass@server1.com/

...
"C:\Program Files (x86)\WinSCP\winscp.com" /script=D:\Script\script.txt /parameter ftp://user:pass@server5.com/some/path/


Note the /some/path/.

The script:

open %1%

put \\Files\Upload\*.jpg
exit


(i.e. no second argument of the put)
victority

Parametrized script help

Hello,

I am trying to make a parametrized scrip to upload jpg files, but I got stuck.

I have servers.bat :

@echo off
"C:\Program Files (x86)\WinSCP\winscp.com" /script=D:\Script\script.txt /parameter ftp://user:pass@server1.com/
"C:\Program Files (x86)\WinSCP\winscp.com" /script=D:\Script\script.txt /parameter ftp://user:pass@server2.com/
"C:\Program Files (x86)\WinSCP\winscp.com" /script=D:\Script\script.txt /parameter ftp://user:pass@server3.com/
"C:\Program Files (x86)\WinSCP\winscp.com" /script=D:\Script\script.txt /parameter ftp://user:pass@server4.com/

"C:\Program Files (x86)\WinSCP\winscp.com" /script=D:\Script\script.txt /parameter ftp://user:pass@server5.com/

And I have script.txt :

open %1%
put \\Files\Upload\*.jpg /
exit


Since the server5.com should have a different path to remote location (put \\Files\Upload\*.jpg /Folder), here the problem starts.
I tried to do with additional parameters, but I could not do anything.

Please help.
Thank you in advance.

Victor