Directory.GetFiles
is your friend here:
Directory.GetFiles(@"C:\Users\Me\Documents", "*.docx");
or, recursively:
Directory.GetFiles(
@"C:\Users\Me\Documents",
"*.docx",
SearchOption.AllDirectories);
More Related Contents:
- Matching strings with wildcard
- Wildcard search for LINQ
- Need to perform Wildcard (*,?, etc) search on a string using Regex
- How to implement glob in C#
- FTP directory partial listing with wildcards
- Wildcard equivalent in C# generics
- What is the equivalent of Java wildcards in C# generics
- OpenFileDialog is not opening the file [closed]
- How do I read and parse an XML file in C#?
- Unable to create a constant value of type Only primitive types or enumeration types are supported in this context
- How can I deserialize a child object with dynamic (numeric) key names?
- Read MS Exchange email in C#
- Deserializing JSON with unknown object names
- how to run visual studio without plugin and all third party feature
- No templates in Visual Studio 2017
- How do I convert an ISO8601 TimeSpan to a C# TimeSpan?
- How to find FQDN of local machine in C#/.NET ?
- C# regex to remove non – printable characters, and control characters, in a text that has a mix of many different languages, unicode letters
- How does Entity Framework work with recursive hierarchies? Include() seems not to work with it
- C#7: Underscore ( _ ) & Star ( * ) in Out variable
- How to get video duration from mp4, wmv, flv, mov videos
- How to implement Permission Based Access Control with Asp.Net Core
- UserManager SendEmailAsync No Email Sent
- Is there any way to call the parent version of an overridden method? (C# .NET)
- Toggle switch control in Windows Forms
- Simulate variadic templates in C#
- openxml spreadsheat save-as
- C# Xml Serialization & Deserialization
- How to return XML in ASP.NET?
- iTextSharp international text