Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Locating Zip folders

Locating Zip folders

Scheduled Pinned Locked Moved C#
csharptutorial
4 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nitin raj
    wrote on last edited by
    #1

    Hi, I have to unzip multiple folders present in a single folder using c#. I have the code for doing this and it is working fine. For using this code I have to select the file that is to be unzipped and then after unziping it I have to select the next zip file and unzip it and so on. This is a very long process. Can anyone tell me how to unzip all the zip folders present in the parent folder at one go. thanx Nitin.

    Nitin Raj Bidkikar

    H 1 Reply Last reply
    0
    • N Nitin raj

      Hi, I have to unzip multiple folders present in a single folder using c#. I have the code for doing this and it is working fine. For using this code I have to select the file that is to be unzipped and then after unziping it I have to select the next zip file and unzip it and so on. This is a very long process. Can anyone tell me how to unzip all the zip folders present in the parent folder at one go. thanx Nitin.

      Nitin Raj Bidkikar

      H Offline
      H Offline
      Hessam Jalali
      wrote on last edited by
      #2

      You can use Directory.GetFiles method for locating all the zip files and then use your code I think general scheme whould be like this string[]zipFiles; foreach(string zf in zipFiles) . . . //your code here hope the post would help

      N 1 Reply Last reply
      0
      • H Hessam Jalali

        You can use Directory.GetFiles method for locating all the zip files and then use your code I think general scheme whould be like this string[]zipFiles; foreach(string zf in zipFiles) . . . //your code here hope the post would help

        N Offline
        N Offline
        Nitin raj
        wrote on last edited by
        #3

        hey ur soln has helped me........but along with the zip files there are some word documents present....so when the control comes to the word files it is throwing exception.......how do i make the code to ignore the word docs and just unzip the zip files..... thanx nitin

        Nitin Raj Bidkikar

        H 1 Reply Last reply
        0
        • N Nitin raj

          hey ur soln has helped me........but along with the zip files there are some word documents present....so when the control comes to the word files it is throwing exception.......how do i make the code to ignore the word docs and just unzip the zip files..... thanx nitin

          Nitin Raj Bidkikar

          H Offline
          H Offline
          Hessam Jalali
          wrote on last edited by
          #4

          you can filter the files with using the overloaded version of the GetFiles(string path,string searchPattern) it would be somewhat like this for zip files

          string[] files=System.IO.Directory.GetFiles(path, "*.zip");
          

          good luck

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups