I want to extract a zip file on Server Core 2008.

Can anyone tell me the command to do so?

link|improve this question
Move this question to one of the other trilogy sites, please. It doesn't belong here. – David Pfeffer Jan 5 '10 at 4:22
I think the question is okay for Serverfault. – splattne Jan 5 '10 at 9:09
feedback

migrated from stackoverflow.com Jan 5 '10 at 4:38

This question came from our site for professional and enthusiast programmers.

3 Answers

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\")
link|improve this answer
feedback

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.

link|improve this answer
1  
7-zip.org Has a good command line version. – Qwerty Jan 5 '10 at 5:16
yeah I've had issues with 7-zip. Like most open source software, YMMV. – Jim B Jan 5 '10 at 5:37
feedback

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown