search file using wildcard in c#
By Super Man
How you can search file using wildcard in c#
string[] files = Directory.GetFiles(@"E:\ ", "User*", SearchOption.AllDirectories);
foreach (string file in files)
{
MessageBox.Show(dir);
}
it will serach all files which starts with User and in E: drive.
in messagebox it will give you the full path of a file.
search file using wildcard in c# (1475 Views)