Topic "Using /parameters with winscp3.com /script= call"

Author Message
bfolger71

Guest


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!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Are you sure you are using the latest version of WinSCP?
_________________
Martin Prikryl
bfolger71

Guest


prikryl 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.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License