Using /parameters with winscp3.com /script= call

Advertisement

bfolger71
Guest

Using /parameters with winscp3.com /script= call

Hello -

I'm trying to use parameters with a /script call from winscp3.com. I have a .bat file that sets some date variables, and I'd like to pass those through to the script. I've spent a good deal of time on the documentation, and it appears this is supported, but it's not working as outlined below. Note that if I remove the parameters and "dynamic" date code from the processing, it works like a charm. So I've ruled out permissions, etc. from the equation.

My .bat:

@echo off
set mydate=%date%
set myyear=%mydate:~12,2%
set mymonth=%mydate:~4,2%
set myday=%mydate:~7,2%
winscp3.com /script="\\usmaastdb1\SFTPScripts\GetInfoScript.txt" /parameter %myyear% %mymonth% %myday%

My GetInfoScript.txt file:

option batch on
option confirm off
open [profile_name] <-- replaced for privacy reasons
get filename_%1%%2%%3%.TXT E:\AST_MediaSystem_Incoming\
exit

Any help would be greatly appreciated! Thanks!

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,477
Location:
Prague, Czechia

Re: Using /parameters with winscp3.com /script= call

Are you sure you are using the latest version of WinSCP?
_________________
Martin Prikryl

Reply with quote

bfolger71
Guest

Re: Using /parameters with winscp3.com /script= call

martin wrote:

Are you sure you are using the latest version of WinSCP?

Good lord...

The server was on 3.71! I upgraded the version, and the statement worked fine. Thanks so much, and sorry for the *very* basic oversight.

Reply with quote

Advertisement

You can post new topics in this forum