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
Abhilash J A
519
2.4k
604.2k
How create zip file by selecting listview items ?
Jan 3 2017 11:23 AM
Hello everyone,
How can I create listview selected each images create as a Zip file?
Now error occured.
'
Access to the path 'c:\example' is denied.
'
string
FileName = @
"c:\example"
;
if
(Directory.Exists(FileName))
{
foreach
(Tble_Documents item
in
listView1.SelectedItems)
{
string
[] files = Directory.GetFiles(System.IO.Path.GetDirectoryName(item.Fullname),
"*.jpg"
);
using
(FileStream zipToOpen =
new
FileStream(FileName, FileMode.Open))
/*
Here occurring that error
*/
{
using
(ZipArchive archive =
new
ZipArchive(zipToOpen, ZipArchiveMode.Create))
{
foreach
(var file
in
files)
{
archive.CreateEntryFromFile(file, file);
}
}
}
}
}
Reply
Answers (
4
)
Datagrid checkbox not workign in single click
i just wanted to bind data trigger with chkbox