Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

Maher

Re: Password Prompt while scripting

F. den Blaauwen wrote:

1 While in console mode, when the password is not right, you must enter a password. In a script this is not handy, cause is would run unattended. Yes option prompt off, and yes again option batch on.


I'm having the same problem. I need the application to end if an incorrect password is passed within a script, I am running in console mode as a windows process and I don't want to leave the process running.
F. den Blaauwen

It is not that I like to use the wrong password, but the password has changed on the ftp-server. But I've found a good workaround using pscp.

Thanks for the replies and keep up the good work
martin

Re: Password Prompt while scripting

OK, I'll think about it. But I wonder why would you try to run script using stored session with wrong password?
F. den Blaauwen

Re: Password Prompt while scripting

Sorry, I forgot to answer your question.

Yes I do mind the console asking, cause when I use a script, I use it unattended. I would like to have WinSCP to terminate and return errorlevel 1. The batchfile calling WinSCP can send a mail to the administrator that the upload didn't work.
F. den Blaauwen

Re: Password Prompt while scripting

I run the following script test.s with the command winscp3 /console /script=test.s
The user someuser@somesite.nl has been saved with a password in 'stored sessions'. When I use the right password, no userintervention is needed, when the password is wrong, the console prompts for a password (and waits for ever when the user does nothing)

[script starts here]
option batch on
option confirm off
open someuser@somesite.nl
option transfer binary
put somefile
close
exit
[script ends here]
martin

Re: Password Prompt while scripting

F. den Blaauwen wrote:

1 While in console mode, when the password is not right, you must enter a password. In a script this is not handy, cause is would run unattended. Yes option prompt off, and yes again option batch on.

I do not understand this. You mind that you are asked for password second time if you enter wrong one the first time?

2 When the console is started using winscp3.com, the errorlevel is 0 when the password is not right. (For now entered manually: see problem 1). A possible workaround is using winscp3.exe /console but this opens a new console-box.

Good point. Error level is not propagated to .com from the .exe. I'll fix it in the next release.
F. den Blaauwen

Password Prompt while scripting

I've been busy using scripting and I have encountered 2 problems:

1 While in console mode, when the password is not right, you must enter a password. In a script this is not handy, cause is would run unattended. Yes option prompt off, and yes again option batch on.

2 When the console is started using winscp3.com, the errorlevel is 0 when the password is not right. (For now entered manually: see problem 1). A possible workaround is using winscp3.exe /console but this opens a new console-box.

Can someone help me on this, or are this plain bugs?