I tried this code, but it shows nothing when entering part of the file name.
string pattern = txtFilter.Text;
string[] files = Directory.GetFiles(txtSourcePath.Text, ("*" + pattern + "*"),
SearchOption.AllDirectories);
foreach (var file in files)
{
txtResults.Text += file + "\n";
}
Aucun commentaire:
Enregistrer un commentaire