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

bfolger71

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.
martin

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

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

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!