warning message about command line parameters in scripting on one workstation, but not the other

Advertisement

Dan Curious
Donor
Joined:
Posts:
44
Location:
NY

warning message about command line parameters in scripting on one workstation, but not the other

Hi,

We have version 5.11.3, build 7995 on the server. When we run the command line - which includes the sesion name - with various command line parameters for dealing with file permissions, there's a warning about using command line parameters with scripting.

On the desktop 5.17.9, build 10905, we don't get that warning.

Were the command line options depracated at one time, but it was backed out and allowed in a version later than 5.11?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,285
Location:
Prague, Czechia

Re: warning message about command line parameters in scripting on one workstation, but not the other

You should get the warning even with the latest version. I get it, when I try simple:
C:\>winscp.com name /command "exit"
Opening session using command-line parameter in scripting is deprecated. Use 'open' command instead.              
In scripting you should not rely on saved sites, use this command instead:                                        open ...
Searching for host...                                                                                             Connecting to host...                                                                                             Authenticating...                                                                                                 
...

In general, the recommended approach is to use the open command. If you want to combine opening the session from command-line and commands in the script, without getting the deprecation warning, you can do this:
winscp.com /command "open name" /script=script.txt

Reply with quote

Guest

Re: warning message about command line parameters in scripting on one workstation, but not the other

So, instead of
winscp.com "JohnDoe" -nopreservetime IgnorePermErrors=1   /console /loglevel=2 /log=debuglog.log /script=JohnDoe.scr
, we'd use something like
winscp.com /command "open JohnDoe" -nopreservetime IgnorePermErrors=1   /console /loglevel=2 /log=debuglog.log /script=JohnDoe.scr
? Do I have the right idea?

Reply with quote

martin
Site Admin
martin avatar

Re: warning message about command line parameters in scripting on one workstation, but not the other

Correct.

Note that there's nothing like -nopreservetime IgnorePermErrors=1 (in neither of the two syntaxes).

Reply with quote

Advertisement

You can post new topics in this forum