3
Answers

Copying files to a removable disk

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.
Answers (3)