public void NewDownload(string rootUri, string blobContainerName, string rootPath) { foreach (string localeUri in AzureUtils.ListCurrentDirectories(rootUri)) { string locale; try { locale = localeUri.GetLastNPart('/'); } catch { continue; } foreach (string timeStampUri in AzureUtils.ListCurrentDirectories(localeUri)) { string timeStamp = timeStampUri.GetLastNPart('/'); DateTime dt = DateTime.Parse(timeStamp); timeStamp = dt.ToString("yyyyMMdd"); foreach (string speakerIdUri in AzureUtils.ListCurrentDirectories(timeStampUri)) { string speakerId = timeStampUri.GetLastNPart('/'); string localFolderPath = Path.Combine(rootPath, locale, timeStamp, speakerId); Directory.CreateDirectory(localFolderPath); foreach (string azureFilePath in AzureUtils.ListCurrentBlobs(speakerIdUri)) { string fileName = azureFilePath.GetLastNPart('/'); string localFilePath = Path.Combine(localFolderPath, fileName); AzureUtils.DownloadFile(azureFilePath, localFilePath); } } } } }