I want to extract a zip file on Server Core 2008.
Can anyone tell me the command to do so?
I want to extract a zip file on Server Core 2008.
Can anyone tell me the command to do so?
You could use this code snippet for a .vbs file (VBScript):
Function WindowsUnZip(sUnzipFileName, sUnzipDestination)
Set oUnzipFSO = CreateObject("Scripting.FileSystemObject")
If Not oUnzipFSO.FolderExists(sUnzipDestination) Then
oUnzipFSO.CreateFolder(sUnzipDestination)
End If
With CreateObject("Shell.Application")
.NameSpace(sUnzipDestination).Copyhere .NameSpace(sUnzipFileName).Items
End With
Set oUnzipFSO = Nothing
End Function
Call WindowsUnZip("C:\example.zip", "C:\DestinationFolder\")
zip.exe and unzip.exe are in my tools folder since 1994 and they work fine in Server Core. I use the versions from Info-ZIP
There is no command line utility buit in to unzip files. When copying files to server core I recommend using makecab and expand. Or you can install the unzip command line tool of your preference.