mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-26 14:26:10 +01:00
Renamed to new-zipfile.ps1
This commit is contained in:
parent
d1d9716572
commit
8d2f3506c3
@ -179,6 +179,7 @@ new-script.ps1, creates a new PowerShell script
|
|||||||
new-shortcut.ps1, creates a new shortcut
|
new-shortcut.ps1, creates a new shortcut
|
||||||
new-symlink.ps1, creates a new symbolic link
|
new-symlink.ps1, creates a new symbolic link
|
||||||
new-tag.ps1, creates a new tag in a Git repository
|
new-tag.ps1, creates a new tag in a Git repository
|
||||||
|
new-zipfile.ps1, creates a new .zip file from a directory
|
||||||
reboot.ps1, reboots the local computer (needs admin rights)
|
reboot.ps1, reboots the local computer (needs admin rights)
|
||||||
reboot-fritzbox.ps1, reboots the FRITZ!box device
|
reboot-fritzbox.ps1, reboots the FRITZ!box device
|
||||||
remove-empty-dirs.ps1, removes empty subfolders within the given directory tree
|
remove-empty-dirs.ps1, removes empty subfolders within the given directory tree
|
||||||
@ -248,4 +249,3 @@ write-rot13.ps1, encodes or decodes the given text with ROT13
|
|||||||
write-typewriter.ps1, writes the given text with the typewriter effect
|
write-typewriter.ps1, writes the given text with the typewriter effect
|
||||||
write-uppercase.ps1, writes the given text in uppercase letters
|
write-uppercase.ps1, writes the given text in uppercase letters
|
||||||
write-vertical.ps1, writes the given text in vertical direction
|
write-vertical.ps1, writes the given text in vertical direction
|
||||||
zip-dir.ps1, creates a .zip archive of the given directory
|
|
||||||
|
Can't render this file because it has a wrong number of fields in line 83.
|
@ -165,14 +165,14 @@ Mega Collection of PowerShell Scripts
|
|||||||
| [MD5.ps1](Scripts/MD5.ps1) | Prints the MD5 checksum of the given file | [Help](Docs/wakeup.ps1.md) |
|
| [MD5.ps1](Scripts/MD5.ps1) | Prints the MD5 checksum of the given file | [Help](Docs/wakeup.ps1.md) |
|
||||||
| [new-shortcut.ps1](Scripts/new-shortcut.ps1) | Creates a new shortcut | [Help](Docs/wakeup.ps1.md) |
|
| [new-shortcut.ps1](Scripts/new-shortcut.ps1) | Creates a new shortcut | [Help](Docs/wakeup.ps1.md) |
|
||||||
| [new-symlink.ps1](Scripts/new-symlink.ps1) | Creates a new symbolic link | [Help](Docs/wakeup.ps1.md) |
|
| [new-symlink.ps1](Scripts/new-symlink.ps1) | Creates a new symbolic link | [Help](Docs/wakeup.ps1.md) |
|
||||||
|
| [new-zipfile.ps1](Scripts/new-zipfile.ps1) | Creates a new .zip file from a directory | [Help](Docs/wakeup.ps1.md) |
|
||||||
| [publish-to-ipfs.ps1](Scripts/publish-to-ipfs.ps1) | Publishes the given files or directory to IPFS | [Help](Docs/wakeup.ps1.md) |
|
| [publish-to-ipfs.ps1](Scripts/publish-to-ipfs.ps1) | Publishes the given files or directory to IPFS | [Help](Docs/wakeup.ps1.md) |
|
||||||
| [remove-empty-dirs.ps1](Scripts/remove-empty-dirs.ps1) | Removes empty subfolders within the given directory tree | [Help](Docs/wakeup.ps1.md) |
|
| [remove-empty-dirs.ps1](Scripts/remove-empty-dirs.ps1) | Removes empty subfolders within the given directory tree | [Help](Docs/wakeup.ps1.md) |
|
||||||
| [search-filename.ps1](Scripts/search-filename.ps1) | Searches the directory tree for filenames by given pattern | [Help](Docs/wakeup.ps1.md) |
|
| [search-filename.ps1](Scripts/search-filename.ps1) | Searches the directory tree for filenames by given pattern | [Help](Docs/wakeup.ps1.md) |
|
||||||
| [search-files.ps1](Scripts/search-files.ps1) | Searches the given pattern in the given files | [Help](Docs/wakeup.ps1.md) |
|
| [search-files.ps1](Scripts/search-files.ps1) | Searches the given pattern in the given files | [Help](Docs/wakeup.ps1.md) |
|
||||||
| [SHA1.ps1](Scripts/SHA1.ps1) | Prints the SHA1 checksum of the given file | [Help](Docs/wakeup.ps1.md) |
|
| [SHA1.ps1](Scripts/SHA1.ps1) | Prints the SHA1 checksum of the given file | [Help](Docs/wakeup.ps1.md) |
|
||||||
| [SHA256.ps1](Scripts/SHA256.ps1) | Prints the SHA256 checksum of the given file | [Help](Docs/wakeup.ps1.md) |
|
| [SHA256.ps1](Scripts/SHA256.ps1) | Prints the SHA256 checksum of the given file | [Help](Docs/wakeup.ps1.md) |
|
||||||
| [upload-file.ps1](Scripts/zip-dir.ps1) | Uploads the local file to the given FTP server | [Help](Docs/wakeup.ps1.md) |
|
| [upload-file.ps1](Scripts/upload-file.ps1) | Uploads the local file to the given FTP server | [Help](Docs/wakeup.ps1.md) |
|
||||||
| [zip-dir.ps1](Scripts/zip-dir.ps1) | Creates a .zip archive of the given directory | [Help](Docs/wakeup.ps1.md) |
|
|
||||||
|
|
||||||
♻️ Scripts to Convert Files
|
♻️ Scripts to Convert Files
|
||||||
---------------------------
|
---------------------------
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
zip-dir.ps1 [<directory>]
|
new-zipfile.ps1 [<directory>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Creates a .zip archive of the given directory.
|
Creates a new .zip file from a directory.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\zip-dir.ps1 C:\Windows
|
PS> .\new-zipfile.ps1 C:\Windows
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
@ -21,7 +21,7 @@ try {
|
|||||||
compress-archive -path $directory -destinationPath $directory.zip
|
compress-archive -path $directory -destinationPath $directory.zip
|
||||||
|
|
||||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||||
"✔️ created zip archive: $($directory).zip in $Elapsed sec"
|
"✔️ created zip file $($directory).zip in $Elapsed sec"
|
||||||
exit 0
|
exit 0
|
||||||
} catch {
|
} catch {
|
||||||
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
Loading…
Reference in New Issue
Block a user