Topic "Using /parameters with /script= call"

Author Message


Hello -

I'm trying to use parameters with a /script call from 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% /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\

Any help would be greatly appreciated! Thanks!
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
Are you sure you are using the latest version of WinSCP?
Martin Prikryl


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.

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License