Differences

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

2015-01-27 2015-01-28
prompt pattern (martin) correcting "use remote files" (martin)
Line 17: Line 17:
===== General Hints ===== ===== General Hints =====
-  * Both PowerShell script and WinSCP script are to be executed locally using path to the remote files, so make sure you select //Local command// [[custom_command#types|type]] and //[[ui_customcommand|Use remote paths]]// option.+  * Both PowerShell script and WinSCP script are to be executed locally using path to the remote files, so make sure you select //Local command// [[custom_command#types|type]] and //[[ui_customcommand|Use remote files]]// option.
  * The application run as a custom command (be it ''powershell.exe'' or WinSCP in a console mode) is executed in WinSCP startup directory, not in a WinSCP [[executable]] directory, nor directory shown in local panel (in [[ui_commander|Commander interface]]). \\ So generally, you should use a full path to a local files, both in the custom command itself (particularly for a path to WinSCP executable and path to the script) and the script (including a [[library_powershell#loading|path to WinSCP .NET assembly]]). \\ You can make use of ''[[scripting#variables|%WINSCP_PATH%]]'' to refer to the WinSCP executable path.   * The application run as a custom command (be it ''powershell.exe'' or WinSCP in a console mode) is executed in WinSCP startup directory, not in a WinSCP [[executable]] directory, nor directory shown in local panel (in [[ui_commander|Commander interface]]). \\ So generally, you should use a full path to a local files, both in the custom command itself (particularly for a path to WinSCP executable and path to the script) and the script (including a [[library_powershell#loading|path to WinSCP .NET assembly]]). \\ You can make use of ''[[scripting#variables|%WINSCP_PATH%]]'' to refer to the WinSCP executable path.
  * If the custom command refers to files (i.e. uses [[custom_command#patterns|patterns]] like ''!'', ''!&'', ''!^!''), WinSCP windows is blocked, while the command is running. Should you want to avoid that, use ''start'' command: \\ <code batch>   * If the custom command refers to files (i.e. uses [[custom_command#patterns|patterns]] like ''!'', ''!&'', ''!^!''), WinSCP windows is blocked, while the command is running. Should you want to avoid that, use ''start'' command: \\ <code batch>

Last modified: by martin