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.

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)


Topic review


Re: Automated login via Explicit TLS over FTP fails, Access denied

Anonymous wrote:

or with UTF8-code-replace:
"pass%2B%2Bword-> winscp: "passBBword"

This is the correct syntax for WinSCP command-line.
But not for a batch file (where you probably use the command).
The command interpreter (cmd.exe) replaces the %2 with the second argument of the batch file. So WinSCP gets passBBword if the second argument is not specified.
You have to escape the % by doubling it: pass%%2B%%2Bword.

The next version of WinSCP will be able to generate a batch file too (not only the URL), caring for this.

Re: Automated login via Explicit TLS over FTP fails, Access denied

@prikryl: Great Thanks for your tip, it works now !

The problem are special characters in the password and the mandatory quotes of /command "open ...", when I use it in one command line. It's mandatory that all FTP-commands of /command are between quotes and then the password doesn't commit correct.
I also replace the special characters in UTF8-code, but it doesn't work.

Here an example with /command "open...":
"pass++word" -> winscp: "pass word"

or with UTF8-code-replace:
"pass%2B%2Bword-> winscp: "passBBword"

I don't find a solution with one command line in a batchfile like /command "open...".

The only working solution for me was, that I put the FTP-commands in a separate script file and start the script file with " /script=...". In this case the quotes aren't mandatory so I can disclaim the quotes in the script file and the password with special characters in the URL is recognized and commited correctly. You can see it also in the logfile.

Automated login via Explicit TLS over FTP fails, Access denied


I have a special problem with the command line tool of WinSCP if I want to do an automated login in a batch script via Explicit TLS over FTP like this. /command "option batch continue" "option confirm off" "open -explicit" ...

It doesn't work -> "Access denied", my assumption: the problem is the password in the line

- when i login with these login data via WinSCP GUI, it works

- when i use the command line without password, I must manually enter the password but ist works too, the login is successful /command "option batch continue" "option confirm off" "open -explicit"

- only when I want do an automated login with user and password in the command line, it doesn't work -> Access denied.

I suppose that the password doesn't commit like expected but I don't find a solution for my problem. Or do I make something wrong.