שתף באמצעות


Unzip using 7zip

Question

Tuesday, October 14, 2014 12:35 PM

Hallo,

I am trying to code in visual basic.

Can anyone please help me with a piece of code that can be used to unzip a file by starting external 7zip.exe application.

Thankyou in advance..

All replies (3)

Wednesday, October 15, 2014 9:03 AM ✅Answered

thank you Blackwood,

I used the code something like :

   Dim exePath As String = "C:\Program Files\7-Zip\7z.exe"
   Dim args As String = "C:\DATA\TestData\K0080130001.zip" + "C:\DATA\TestData\New Folder"
   System.Diagnostics.Process.Start(exePath, args)

But I could not get the files unzipped.

I am trying to unzip the C:\DATA\TestData\K0080130001.zip file into the directory named C:\DATA\TestData\New Folder.

Hi P.Shah,

>>I am trying to unzip the C:\DATA\TestData\K0080130001.zip file into the directory named C:\DATA\TestData\New Folder.

You need to check 7zip document: http://sevenzip.sourceforge.jp/chm/cmdline/commands/extract.htm

7z e C:\DATA\TestData\K0080130001.zip -o"C:\DATA\TestData\New Folder\"

Vb.net code:

Dim exePath As String = "C:\Program Files\7-Zip\7z.exe"
Dim args As String = "e C:\DATA\TestData\K0080130001.zip" + " -o""C:\DATA\TestData\New Folder\"""
System.Diagnostics.Process.Start(exePath, args)

We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.


Tuesday, October 14, 2014 12:52 PM | 1 vote

You can use Process.Start to run an external application

Dim exePath As String = "c:\?somefolder?\7zip.exe"
Dim args As String = "??" 'presumably the path to the Zip file and folder to unzip to
System.Diagnostics.Process.Start(exePath, args)

Wednesday, October 15, 2014 6:32 AM

thank you Blackwood,

I used the code something like :

   Dim exePath As String = "C:\Program Files\7-Zip\7z.exe"
   Dim args As String = "C:\DATA\TestData\K0080130001.zip" + "C:\DATA\TestData\New Folder"
   System.Diagnostics.Process.Start(exePath, args)

But I could not get the files unzipped.

I am trying to unzip the C:\DATA\TestData\K0080130001.zip file into the directory named C:\DATA\TestData\New Folder.

Can you please help me out?

Thank you .