Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit a48fb55

Browse files
committed
Accepts path parameter, instead of extracting to working directory
1 parent bfda848 commit a48fb55

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/extract-zip.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
$cd = (split-path $MyInvocation.MyCommand.Path -parent)
22
$zipPath = $args[0]
3-
Write-Host " * Extracting files into $cd..." -foregroundcolor "green"
3+
$zipDest = $args[1]
4+
Write-Host " * Extracting files into $zipDest..." -foregroundcolor "green"
45
$shell = New-Object -com Shell.Application
56
$zipFile = $shell.NameSpace($zipPath)
67
foreach($item in $zipFile.items())
78
{
8-
$shell.Namespace($cd).copyhere($item)
9+
$shell.Namespace($zipDest).copyhere($item)
910
}

0 commit comments

Comments
 (0)