Differences
This shows you the differences between the selected revisions of the page.
2008-04-11 | 2009-05-29 | ||
4.1 lowercase example insted of permissions with is now configurable using switch (martin) | mysession (martin) | ||
Line 6: | Line 6: | ||
For example to enable HTTP proxy use following INI file: | For example to enable HTTP proxy use following INI file: | ||
<code ini> | <code ini> | ||
- | [Sessions\Server] | + | [Sessions\mysession] |
HostName=example.com | HostName=example.com | ||
UserName=customer | UserName=customer | ||
Line 14: | Line 14: | ||
</code> | </code> | ||
- | Then, providing the INI file is found and loaded by the WinSCP process running the script, you can use command "open Server" to open the pre-configured session. | + | Then, providing the INI file is found and loaded by the WinSCP process running the script, you can use command "open mysession" to open the pre-configured session. |
You can even make a batch file that generates the INI file dynamically based on current context. For example to use value of environmental variable as proxy host name use following batch file: | You can even make a batch file that generates the INI file dynamically based on current context. For example to use value of environmental variable as proxy host name use following batch file: | ||
<code> | <code> | ||
- | echo [Sessions\Server] > server.ini | + | echo [Sessions\mysession] > server.ini |
... | ... | ||
echo ProxyHost=%PROXYHOST% >> server.ini | echo ProxyHost=%PROXYHOST% >> server.ini |