1

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

Can anyone tell me the command to do so?

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

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

  • 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
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\")
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.

  • 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
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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.