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

martin

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

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
Dan Curious

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?