I want to search a directory for all files that match a certain pattern. Surprisingly, I have not had to do this since vb6 (Dir)... I'm sure things have changed since then!
-Thanks
use SearchOption.AllDirectories parameter:
using System.IO;
Directory.GetFiles(@"C:\", "*.mp3", SearchOption.AllDirectories);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With