Differences
This shows you the differences between the selected revisions of the page.
2016-04-29 | 2016-05-25 | ||
error: prefix (martin) | logging (martin) | ||
Line 17: | Line 17: | ||
<code powershell - ZipUpload.ps1> | <code powershell - ZipUpload.ps1> | ||
# @name &ZIP and Upload... | # @name &ZIP and Upload... | ||
- | # @command powershell.exe -ExecutionPolicy Bypass -File "%EXTENSION_PATH%" -sessionUrl "!S" -remotePath "!/" -archiveName "!?&Archive name:?archive.zip!" -pause !& | + | # @command powershell.exe -ExecutionPolicy Bypass -File "%EXTENSION_PATH%" -sessionUrl "!S" -remotePath "!/" -archiveName "!?&Archive name:?archive.zip!" -pause -sessionLogPath "%SessionLogPath%" !& |
# @description Packs the selected files to a ZIP archive and uploads it | # @description Packs the selected files to a ZIP archive and uploads it | ||
# @flag ApplyToDirectories | # @flag ApplyToDirectories | ||
# @require .NET 4.5 | # @require .NET 4.5 | ||
- | # @version 1 | + | # @version 2 |
+ | # @homepage ~~SELF~~ | ||
+ | # @require WinSCP 5.8.3 | ||
+ | # @option SessionLogPath file "&Session log file:" | ||
param ( | param ( | ||
Line 34: | Line 37: | ||
[Parameter(Mandatory)] | [Parameter(Mandatory)] | ||
$archiveName, | $archiveName, | ||
+ | $sessionLogPath = $Null, | ||
[Parameter(Mandatory, ValueFromRemainingArguments, Position=0)] | [Parameter(Mandatory, ValueFromRemainingArguments, Position=0)] | ||
$localPaths | $localPaths | ||
Line 108: | Line 112: | ||
try | try | ||
{ | { | ||
+ | $session.SessionLogPath = $sessionLogPath | ||
+ | |||
# Connect | # Connect | ||
$session.Open($sessionOptions) | $session.Open($sessionOptions) |