Differences
This shows you the differences between the selected revisions of the page.
2016-02-24 | 2016-03-18 | ||
hidden extension to alow it deployment with uplcoming release - publish after the release (martin) | documentation (martin) | ||
Line 1: | Line 1: | ||
====== Pack files to ZIP archive and upload it ====== | ====== Pack files to ZIP archive and upload it ====== | ||
- | ~~NOINDEX~~ | + | The following example uses [[library|WinSCP .NET assembly]] from a [[library_powershell|PowerShell]] script. If you have another preferred language, you can easily translate it. The script requires the latest beta version of WinSCP. &beta |
+ | |||
+ | //In the latest beta version//, the example is distributed in WinSCP installer as a [[extension|WinSCP extension]]. &beta | ||
+ | |||
+ | You can run the script (e.g. ''ZipUpload.ps1'') from WinSCP GUI using a [[guide_custom_commands_automation|local custom command]]: | ||
+ | |||
+ | <code> | ||
+ | powershell.exe -File "ZipUpload.ps1" -sessionUrl "!S" -remotePath "!/" -archiveName "!?&Archive name:?archive.zip!" -pause !& | ||
+ | </code> | ||
+ | |||
+ | You will probably want to enable the //[[ui_customcommand|Apply to directories]]// option. | ||
+ | |||
+ | To use a different archive format than ZIP, you can install [[http://www.7-zip.org/|7-Zip]], add ''-use7Zip'' switch to the custom command; and add the ''-t<type>'' switch to the ''7z.exe'' call in the script (e.g. ''-tgzip''). | ||
<code powershell - ZipUpload.ps1> | <code powershell - ZipUpload.ps1> |