I've created the solution below to return all filepaths, but it does only seem to work for one folder. Any suggestions what I'm doing wrong?
public static List<string> GetFilePaths(string dir)
{
var dirs = Directory.GetDirectories(dir);
if (dirs.Count() > 0)
{
foreach (var pwd in dirs)
{
return GetFilePaths(pwd).ToList();
}
}
return Directory.GetFiles(dir).ToList();
}