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
srungarakavi bhanuprakash
NA
5
0
Using GzipStream to open a .zip file which contains mutiple files.
Feb 20 2009 9:49 AM
I have Issue while opening a .zip file which contains multiple files in it.
When I need to open a zip file which having only one file in it, then here the code for it:
FilePath takes the file with .zip extension
[code]
FileStream fileStream = new FileStream(FilePath, FileMode.Open, FileAccess.Read, FileShare.Read);
GZipStream gZipStream = new GZipStream(fileStream, CompressionMode.Decompress);
StreamReader unzipFileReader = new StreamReader(gZipStream);
[\code]
This code perfect works fine to open a .zip file which contains only one file in it, and reading it through a StreamReader.
But the issue is, I am having multiple log files are of different type. Some are of .zip extension, which contains single file or multiple files in it.
example:
templog.zip
- log1.txt
- log2.txt
- log3.txt
So I need to decompress the .zip file, then I need to read all the files in zip file through streamReader.
It shouldn't create a directory and extract the files as if winrar, or winzip does.
Could someone help me out this issue..
If possible please provide me a some sample code or references.
Thanks in Advance
Reply
Answers (
3
)
setting date time format of date picker control
help