Differences
This shows you the differences between the selected revisions of the page.
| 2020-12-02 | 2020-12-02 | ||
| prevent interpreting /username in the url as a switch (martin) | prevent interpreting /username in the url as a switch (2nd) (martin) | ||
| Line 45: | Line 45: | ||
| <code batch> | <code batch> | ||
| winscp.com /log=winscp.log /ini=nul /command ^ | winscp.com /log=winscp.log /ini=nul /command ^ | ||
| - | "open sftp://username:password@example.com/" ^ | + | "open sftp://user:password@example.com/" ^ |
| "get *" ^ | "get *" ^ | ||
| "exit" | "exit" | ||
| Line 65: | Line 65: | ||
| You need to double the percent sign to escape it. | You need to double the percent sign to escape it. | ||
| - | For example in the following batch file, the username ''username@domain'' contains the ''@'' sign. As the ''@'' sign has a special meaning in the session URL, it needs to be encoded to ''%40''. But as ''%'' sign has a special meaning in the batch file, it needs to be escaped as ''<nowiki>%%</nowiki>'', resulting in final ''<nowiki>%%40</nowiki>''. | + | For example in the following batch file, the username ''user@domain'' contains the ''@'' sign. As the ''@'' sign has a special meaning in the session URL, it needs to be encoded to ''%40''. But as ''%'' sign has a special meaning in the batch file, it needs to be escaped as ''<nowiki>%%</nowiki>'', resulting in final ''<nowiki>%%40</nowiki>''. |
| <code batch> | <code batch> | ||
| winscp.com /log=winscp.log /ini=nul /command ^ | winscp.com /log=winscp.log /ini=nul /command ^ | ||
| - | "open sftp://username%%40domain:password@example.com/" ^ | + | "open sftp://user%%40domain:password@example.com/" ^ |
| "get *" ^ | "get *" ^ | ||
| "exit" | "exit" | ||
| </code> | </code> | ||