Renamed to zip-dir.ps1

This commit is contained in:
Markus Fleschutz 2020-11-22 09:22:35 +00:00
parent 5bee9908c0
commit 2e16b20d56
2 changed files with 6 additions and 4 deletions

View File

@ -40,7 +40,7 @@ The following PowerShell scripts can be found in the `Scripts/` subfolder:
* [weather-report.ps1](Scripts/weather-report.ps1) - prints the local weather report
* [weather-worldwide.ps1](Scripts/weather-worldwide.ps1) - prints the current weather of cities world-wide
* [wakeup.ps1](Scripts/wakeup.ps1) - sends a magic packet to the given computer, waking him up
* [zipdir.ps1](Scripts/zipdir.ps1) - creates a zip archive of the given folder
* [zip-dir.ps1](Scripts/zip-dir.ps1) - creates a zip archive of the given folder
What is PowerShell?
-------------------

View File

@ -1,13 +1,15 @@
#!/snap/bin/powershell
# Syntax: ./zipdir.ps1 <path-to-folder>
# Description: creates a zip archive from the given folder
# Syntax: ./zip-dir.ps1 [<path-to-folder>]
# Description: creates a zip archive of the given folder
# Author: Markus Fleschutz
# Source: github.com/fleschutz/PowerShell
# License: CC0
param([string]$Path)
if ($Path -eq "" ) {
$URL = read-host "Enter path to folder to zip"
}
try {
Compress-Archive -Path $Path -DestinationPath $Path.zip