Differences
This shows you the differences between the selected revisions of the page.
2016-02-04 | 2016-02-23 | ||
hashtable style sessionoptions initilization (martin) | turning to an extension - directives + WINSCP_PATH (martin) | ||
Line 17: | Line 17: | ||
<code powershell> | <code powershell> | ||
+ | # @name &Search for Text... | ||
+ | # @command powershell.exe -ExecutionPolicy Bypass -path "!/" -text !?Text:?! -pause | ||
+ | # @version 1 | ||
+ | # @description Searches recursively for a text in the selected remote directory | ||
+ | |||
param ( | param ( | ||
[Parameter(Mandatory)] | [Parameter(Mandatory)] | ||
Line 28: | Line 33: | ||
{ | { | ||
# Load WinSCP .NET assembly | # Load WinSCP .NET assembly | ||
- | Add-Type -Path "WinSCPnet.dll" | + | $assemblyPath = if ($env:WINSCP_PATH) { $env:WINSCP_PATH } else { $PSScriptRoot } |
+ | ····Add-Type -Path (Join-Path $assemblyPath "WinSCPnet.dll") | ||
# Setup session options | # Setup session options |