Click here to Skip to main content
15,895,283 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
what do I change to this code to copy all the files in the list-box?
C#
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.
Posted
Updated 31-Oct-11 7:03am
v2

1 solution

Iterate through listBox.Items.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900