private static string createDirectoriesBasedOnKeyAndFilelocation(string key, string filelocation)
{
string pathSoFar = "";
foreach (var folder in GetFolders(key, filelocation))
{
try
{
pathSoFar = Path.Combine(pathSoFar, folder);
if (!Directory.Exists(pathSoFar))
Directory.CreateDirectory(pathSoFar);
}
catch (Exception)
{
}
}
return pathSoFar;
}