Hi,
I want extract .zip file from filder and rename inside zip file.
i am using below code for extract and its working also but how can i rename inside file.
- if (ofd.ShowDialog() == DialogResult.OK)
- {
- Path_List.Items.Clear();
- foreach (String file in ofd.FileNames)
- {
- if ((mystream = ofd.OpenFile()) != null) //have tried using Stream in different ways to no avail
- {
- using (mystream)
- {
- // populates text box with selected filenames ????? lists only 1 filename
- Path_List.Items.Add(file);
- txt_File_Count.Text = Path_List.Items.Count.ToString();
- ZipFile zipFile = new ZipFile(file);
- string fullPath = ofd.FileName;
- string filename = ofd.SafeFileName;
- string path = fullPath.Replace(filename, "");
- zipFile.ExtractAll(path, ExtractExistingFileAction.DoNotOverwrite);
- zipFile.ExtractAll(Application.StartupPath);
- }
- }
- }
- Path_List.Items.Clear();
- }
James AxsomPosted Jun 15, 2018, 12:11 PM
Sanghamitra MohantyPosted Jun 12, 2018, 4:59 AM