Sorry, just noticed that you need to convert files from C#.
That's very simple, too. Just use foreach statement to enumerate files from the given folder; use System.IO.Directory class for that:
And for each file use such code:
DataSet.Open(filePath).Clone(Path.Combine(outputDir, Path.GetFileName(filePath) + ".csv") + "?openMode=create").Dispose();