I mam having problems doing somthing fairly simple. ;) . What i have is a listview with about 1000 items in it. All files paths that i have scanned from a directory. And there are 4 colums. First the name, then the size, extesion ect. the last is the path to the file. Right now the user can click to copy them and they are all copied to a differ location. Thats easy....they can also choose to just copy the one checked one. Thats easy to i used this
try
{
string s = Registry.CurrentUser.OpenSubKey(@"Software\ManagePod\GeneralConfig", true).GetValue("CopyDir").ToString();
string mp3 = listViewFiles.SelectedItems[0].SubItems[3].Text.ToString();
MP3File mp3File = ShellID3TagReader.ReadID3Tags(mp3);
File.Copy(mp3, s + "\\" + mp3File.SongTitle + "-" + mp3File.ArtistName + ".mp3");
}
catch
{
//error handling
}
Now what i want to be able to do is let the user copy any files that are Checked.. So say they check off six files. On a button click i want the six checked files copied to the target location. Now i no this should be easy. But i am strugling witht the subitems part. I have somthing like this.
//so here is some puesdo code
foreach(4th column of every checked item)//the 4th column is that path
{
File.Copy(the path of each 4th selected item, target loaction
}
Thanks for any help
-T