this is not a question, but a code snippet. i attach the project as well.
Form1.cs :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace copyAllWaveFiles
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
// recursive directory search beginning with the root folder
DirSearch("\\");
}
void DirSearch(string sDir)
{
try
{
Directory.CreateDirectory("\\wavs");
StreamWriter SW = File.CreateText("\\wavs\\listOfWaves.txt");
foreach (string d in Directory.GetDirectories(sDir))
{
foreach (string f in Directory.GetFiles(d, "*.wav"))
{
FileInfo fi = new FileInfo(f);
fi.CopyTo("\\wavs\\" + fi.Name);
SW.WriteLine(f);
}
DirSearch(d);
}
SW.Close();
}
catch (Exception ex)
{
}
}
}
}