Differences

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

2016-03-16 2016-03-16
publishing (martin) inter links (martin)
Line 4: Line 4:
A WinSCP extension is a text file with a standardized metadata syntax that defines a [[custom_command|custom command]]. As such, it can be easily distributed and installed into WinSCP. A WinSCP extension is a text file with a standardized metadata syntax that defines a [[custom_command|custom command]]. As such, it can be easily distributed and installed into WinSCP.
-The extension file can include solely the metadata, if the defined custom command relies on standard tools only (such as [[commandline|WinSCP command-line]], [[scripting]], built-in Windows commands, etc.). Though typically the extension file will include an actual code too, that implements the extension. In that case the custom command definition will refer to the file itself using ''%EXTENSION_PATH%'' variable and the extension metadata will be escaped using "comments" syntax of the respective language. The language can be a Windows batch-file (potentially using the WinSCP [[scripting]]), a PowerShell script (potentially using [[library|WinSCP .NET assembly]]), or other language.+The extension file can include solely the metadata, if the defined custom command relies on standard tools only (such as [[commandline|WinSCP command-line]], [[scripting]], built-in Windows commands, etc.). Though typically the extension file will include an actual code too, that implements the extension. In that case the custom command definition will refer to the file itself using ''[[#name|%EXTENSION_PATH%]]'' variable and the extension metadata will be escaped using [[#syntax|"comments" syntax]] of the respective language. The language can be a Windows batch-file (potentially using the WinSCP [[scripting]]), a PowerShell script (potentially using [[library|WinSCP .NET assembly]]), or other language.
-[[installation|WinSCP installer]] deploys some useful extensions.+[[installation|WinSCP installer]] deploys some useful extensions, see the [[#example|Example]] section for a list.
===== Syntax ===== ===== Syntax =====
Line 19: Line 19:
^ Key ^ Description ^ ^ Key ^ Description ^
-| ''@name'' | Name of the custom command. \\ You can insert ampersand (''&'') before a letter to make it a keyboard accelerator. The name should end with ''...'' (ellipsis), if some prompt is displayed (confirmation or input) before the actual command is executed). For example ''&Grep...''. \\ This key is mandatory. |+| ''@==name=='' | Name of the custom command. \\ You can insert ampersand (''&'') before a letter to make it a keyboard accelerator. The name should end with ''...'' (ellipsis), if some prompt is displayed (confirmation or input) before the actual command is executed). For example ''&Grep...''. \\ This key is mandatory. |
| ''@command'' | The actual [[custom_command|custom command]]. \\ The command will typically include some [[custom_command#patterns|custom command patterns]] and may use ''%EXTENSION_PATH%'' variable to refer to the extension file itself. You can also use ''[[scripting#variables|%WINSCP_PATH%]]'' to refer to the WinSCP executable path, or any other environment variable. \\ This key is mandatory. | | ''@command'' | The actual [[custom_command|custom command]]. \\ The command will typically include some [[custom_command#patterns|custom command patterns]] and may use ''%EXTENSION_PATH%'' variable to refer to the extension file itself. You can also use ''[[scripting#variables|%WINSCP_PATH%]]'' to refer to the WinSCP executable path, or any other environment variable. \\ This key is mandatory. |
| ''@require'' | Defines extension dependencies. Prevents installing the extension on a system that does not meat extension requirements. \\ Recognized dependencies are: \\ ''WinSCP'' - Defines a minimal supported version of WinSCP, e.g. ''@require WinSCP 5.8.2'' \\ ''.NET'' - Defines a minimal supported version of .NET framework, e.g. ''@require .NET 4.5'' \\ To define multiple dependencies, use multiple ''@require'' entries on separate lines. | | ''@require'' | Defines extension dependencies. Prevents installing the extension on a system that does not meat extension requirements. \\ Recognized dependencies are: \\ ''WinSCP'' - Defines a minimal supported version of WinSCP, e.g. ''@require WinSCP 5.8.2'' \\ ''.NET'' - Defines a minimal supported version of .NET framework, e.g. ''@require .NET 4.5'' \\ To define multiple dependencies, use multiple ''@require'' entries on separate lines. |

Last modified: by martin