Differences

This shows you the differences between the selected revisions of the page.

2019-07-25 2019-07-25
better wording and phrase ordering (martin) stable 5.15 released long time ago - !E should be used now instead of !S (martin)
Line 9: Line 9:
You will typically be using these [[custom_command#patterns|custom command patterns]]: You will typically be using these [[custom_command#patterns|custom command patterns]]:
-  * ''!S'' (session URL) to pass the current session settings to the script. If you want to pass a password too, you have to [[security_credentials|store or remember it]].+  * ''!E'' (session URL) to pass the current session settings to the script. If you want to pass a password too, you have to [[security_credentials|store or remember it]]. //''!E'' is supported by the latest version of WinSCP only. Older versions support only ''!S'', which does not carry all session settings.// &recent
  * ''!/'' and ''!'' combined to ''!/!'' to pass a full path to a selected remote file.   * ''!/'' and ''!'' combined to ''!/!'' to pass a full path to a selected remote file.
  * ''!^!'' to pass a full path to a selected local file.   * ''!^!'' to pass a full path to a selected local file.
Line 58: Line 58:
==== Passing Session Settings ==== ==== Passing Session Settings ====
-As mentioned above use a custom command pattern ''!S'' to pass the current session settings in a form of a session URL to the script.+As mentioned above use a custom command pattern ''!E'' to pass the current session settings in a form of a session URL to the script.
In the script, accept the %%URL%% using a parameter (''sessionUrl'' here) and use ''[[library_sessionoptions_parseurl|SessionOption.ParseUrl]]'' to parse the %%URL%%. In the script, accept the %%URL%% using a parameter (''sessionUrl'' here) and use ''[[library_sessionoptions_parseurl|SessionOption.ParseUrl]]'' to parse the %%URL%%.
Line 80: Line 80:
<code batch> <code batch>
-powershell.exe -File c:\example\example.ps1 -sessionUrl !S+powershell.exe -File c:\example\example.ps1 -sessionUrl !E
</code> </code>
Line 126: Line 126:
==== Passing Session Settings ==== ==== Passing Session Settings ====
-As mentioned above use a custom command pattern ''!S'' to pass the current session settings in a form of a session URL to the script.+As mentioned above use a custom command pattern ''!E'' to pass the current session settings in a form of a session URL to the script.
In the script, accept a session %URL% as a script parameter and pass it to  [[scriptcommand_open|''open'' command]]. In the script, accept a session %URL% as a script parameter and pass it to  [[scriptcommand_open|''open'' command]].
Line 137: Line 137:
<code batch> <code batch>
-"%WINSCP_PATH%\winscp.exe" /script=c:\example\example.txt /parameter // !S+"%WINSCP_PATH%\winscp.exe" /script=c:\example\example.txt /parameter // !E
</code> </code>

Last modified: by martin