Added zipdir.ps1

This commit is contained in:
Markus Fleschutz 2020-06-23 20:34:12 +02:00
parent 2942b3133a
commit f0673bb556
2 changed files with 12 additions and 0 deletions

View File

@ -21,6 +21,7 @@ Scripts Explained
* **txt2wav.ps1** - converts text into a audio .WAV file * **txt2wav.ps1** - converts text into a audio .WAV file
* **weather.ps1** - prints the current weather forecast * **weather.ps1** - prints the current weather forecast
* **wakeup.ps1** - sends a magic packet to the given computer, waking him up * **wakeup.ps1** - sends a magic packet to the given computer, waking him up
* **zipdir.ps1** - creates a zip archive of the given folder
Frequently Asked Questions (FAQ) Frequently Asked Questions (FAQ)
-------------------------------- --------------------------------

11
Scripts/zipdir.ps1 Normal file
View File

@ -0,0 +1,11 @@
#!/snap/bin/powershell
#
# Syntax: zipdir <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)
Compress-Archive -Path $Path -DestinationPath $Path.zip
exit 0