// For complete examples and data files, please go to https://github.com/groupdocs-metadata/GroupDocs.Metadata-for-.NET
string[] files = Directory.GetFiles(directoryPath);
foreach (string path in files) {
// detect format
FormatBase format = FormatFactory.RecognizeFormat(path);
if (format == null) {
// skip unsupported format
continue;
}
if (format.Type == DocumentType.Wav) {
Console.WriteLine("File {0} has WAV format", Path.GetFileName(path));
}
}