TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Feroz Khan
1.4k
300
92k
Extract .zip file From folder
Jun 10 2018 9:27 AM
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();
}
Reply
Answers (
2
)
Triggering API webservice
Export to CSV not working -handheld device-Smart Device App.