How do I use wildcards in C# to list down files contained in a selected folder?
Directory.GetFiles is your friend here:
Directory.GetFiles
Directory.GetFiles(@"C:UsersMeDocuments", "*.docx");
or, recursively:
Directory.GetFiles( @"C:UsersMeDocuments", "*.docx", SearchOption.AllDirectories);
1.4m articles
1.4m replys
5 comments
56.9k users