Differences
This shows you the differences between the selected revisions of the page.
2018-02-20 | 2018-02-20 | ||
5.13 session path methods to remotepath class (martin) | 5.13 Extensions metadata can span multiple lines (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 "%ArchiveName%" -pause -sessionLogPath "%SessionLogPath%" %Use7zip% -path7zip "%Path7zip%" -archive7zip %Archive7zip% !& | + | # @command powershell.exe -ExecutionPolicy Bypass -File "%EXTENSION_PATH%" ^ |
+ | # -sessionUrl "!S" -remotePath "!/" -archiveName "%ArchiveName%" -pause ^ | ||
+ | # -sessionLogPath "%SessionLogPath%" %Use7zip% -path7zip "%Path7zip%" ^ | ||
+ | # -archive7zip %Archive7zip% !& | ||
# @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 | ||
Line 27: | Line 30: | ||
# @option - -config -run group "7-zip" | # @option - -config -run group "7-zip" | ||
# @option Use7zip -config -run checkbox "Use &7-zip" "" -use7zip | # @option Use7zip -config -run checkbox "Use &7-zip" "" -use7zip | ||
- | # @option Archive7zip -config -run dropdownlist "Archive &type (with 7-zip):" zip zip 7z xz gzip bzip2 tar | + | # @option Archive7zip -config -run dropdownlist "Archive &type (with 7-zip):" ^ |
- | # @option Path7zip -config file "7-zip &path (7z.exe/7za.exe):" "C:\Program Files\7-Zip\7z.exe" | + | # zip zip 7z xz gzip bzip2 tar |
+ | # @option Path7zip -config file "7-zip &path (7z.exe/7za.exe):" ^ | ||
+ | # "C:\Program Files\7-Zip\7z.exe" | ||
# @option - -config group "Logging" | # @option - -config group "Logging" | ||
# @option SessionLogPath -config sessionlogfile | # @option SessionLogPath -config sessionlogfile | ||
Line 146: | Line 151: | ||
$session.Open($sessionOptions) | $session.Open($sessionOptions) | ||
- | $session.PutFiles([WinSCP.RemotePath]::EscapeFileMask($archivePath), $remotePath).Check() | + | $filePath = [WinSCP.RemotePath]::EscapeFileMask($archivePath) |
+ | $session.PutFiles($filePath, $remotePath).Check() | ||
Write-Host "Archive $archiveName uploaded." | Write-Host "Archive $archiveName uploaded." |