i have a RadUpload that uploads zip file only, so i want to rename the each file during Extraction Process, i tried a way :
Protected Sub Upload(sender As Object, e As EventArgs)
Dim extractPath As String = Server.MapPath("~/temp/")
Dim file1 As String = RadUpload1.UploadedFiles(0).FileName
ExtractFileToDirectory(file1, extractPath)
End Sub
Public Sub ExtractFileToDirectory(zipFileName As String, outputDirectory As String)
Dim zip As ZipFile = ZipFile.Read(outputDirectory & zipFileName)
Directory.CreateDirectory(outputDirectory)
For Each e As ZipEntry In zip
Dim NewName As String = Now().ToString("ddMMyyhhmmss")
Dim newext As String = ".jpg"
e.FileName = NewName + newext
e.Extract(outputDirectory, ExtractExistingFileAction.OverwriteSilently)
Next
End Sub
at the first it will rename and extract the first file but then gives this error:
[ It has been adjusted Group: Could not execute the census process. ]
any idea?