I'm making a mini disk cleaner and I have wrote this code:
listView1.Items.Clear();
DirectoryInfo dirCustom = new DirectoryInfo("C:\\Windows\\");
FileInfo[] filCustom;
filCustom = dirCustom.GetFiles("*.txt");
foreach (FileInfo filFile in filCustom)
{
listView1.Items.Add(filFile.Name, "test");
}
However there are some missing parts, works fine but i need to search multiple path and extensions and it only displays the file name on the list view on detailed view. I want it to display the folder path and file size.
How to display files in a multiple directory?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Mar 7, 2012, 5:40 AM EST
To deal with other folder paths or extensions, I suggest you add a couple of TextBoxes to allow the user to specify these and then use their Text properties in place of the folder path and extension you hard-coded earlier.
Emre Ozpalamutcu39 reputationPosted Mar 7, 2012, 5:46 AM EST
Thanks for try to help.