Hello all
I have made a code that looks for a zip-file then take all the digits from the zipfile name and creates a folder with the name also unzip the content to the created folder.
now is my issue.
I need a loop/ a function that zip all the zipfiles inside a zip.
I have read some on google and forums but I haven't found solution yet.
Could someone help me.
this is my code so far:
could someone help me?
Thank you in advance
I have made a code that looks for a zip-file then take all the digits from the zipfile name and creates a folder with the name also unzip the content to the created folder.
now is my issue.
I need a loop/ a function that zip all the zipfiles inside a zip.
I have read some on google and forums but I haven't found solution yet.
Could someone help me.
this is my code so far:
Code:
Imports Microsoft.Office.Interop
Imports System
Imports System.IO
Imports System.IO.Compression
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim Fpath = ("C:\XML_Files_Extract")
Dim mystring As String = "C:\X\36001-37000\36001-36100\36062\"
Dim arFiles As String()
arFiles = Directory.GetFiles("C:\XML_Files_Extract\", "*original från kund*.zip")
Dim i As Integer
For i = 0 To arFiles.Length - 1
Dim myZipandPath As String = (arFiles(i).ToString())
Dim MyZipDigits = CInt(Val(New Text.StringBuilder((From ch In myZipandPath.ToCharArray Where IsNumeric(ch)).ToArray).ToString))
Dim myDigitString As String = MyZipDigits ' converted array to string
Dim ZPath As String = (Fpath + "\" + myDigitString)
MkDir(ZPath)
ZipFile.ExtractToDirectory(myZipandPath, ZPath)
Next
End Sub
could someone help me?
Thank you in advance