1

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

Can anyone tell me the command to do so?

splattne
  • 28,508
  • 20
  • 98
  • 148

3 Answers3

2

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\")
splattne
  • 28,508
  • 20
  • 98
  • 148
1

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

Peter Hahndorf
  • 14,058
  • 3
  • 41
  • 58
1

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.

Jim B
  • 24,081
  • 4
  • 36
  • 60