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
Gerade Geldenhuys
NA
16
9.7k
Copying files to a removable disk
Oct 31 2011 12:19 PM
what do I change to this code to copy all the files in the list-box?
FileInfo fi = new FileInfo(listBox1.SelectedItem.ToString());
string name = fi.Name;
label6.Text = name;
int size = Convert.ToInt32(fi.Length);
label4.Text = (Convert.ToInt32(size) / 1024).ToString() + "KB";
fi.CopyTo(comboBox1.SelectedItem.ToString()+ name);
Of course I use an openfiledialog to add the files to the list box.
Reply
Answers (
3
)
Without using openfiledialog
Diff between const & readonly keyword