extracting files from a zip file

This topic contains 0 replies, has 1 voice, and was last updated by Profile photo of Forums Archives Forums Archives 5 years, 5 months ago.

  • Author
    Posts
  • #6087

    by sukans1995 at 2013-05-03 14:03:49

    1. I get a zip file by email
    2. extract the file from the zip file and save it on a drive with

    Need a script to automate this.

    Thanks

    by riffy at 2013-05-03 16:54:56

    If you have the latest dotNet 4.5 installed you can use the zip functionality included in it:

    [System.Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem')
    [System.IO.Compression.ZipFile]::ExtractToDirectory($sourceFile, $targetFolder)

You must be logged in to reply to this topic.