title: Recursive Upload to Azure-Files / Create Subfolder
body: <p>i want to Upload a folder recursivly to an azure-files storage.
  The file structure usually has several subfolders.
  What is the best way to create the subfolders in azure-files?</p>
  
  <pre><code>    foreach (string fullLocalFilename in System.IO.Directory.GetFiles(locationOfFolderToUpload, "*.*", System.IO.SearchOption.AllDirectories))
              {
                  Console.WriteLine(fullLocalFilename);
                  FileInfo localfile = new FileInfo(fullLocalFilename);
                  var root = share.GetRootDirectoryReference();
                  string strPfad = localfile.DirectoryName.Substring(3);
                  var folder = root.GetDirectoryReference(strPfad);
                  Console.WriteLine(strPfad);
                  folder.CreateIfNotExists();
                  CloudFile file = folder.GetFileReference(localfile.Name);
                  if (file.Exists() == false) {
                      file.Create(localfile.Length);
                      file.UploadFromFile(fullLocalFilename);
                      Console.WriteLine(fullLocalFilename);
                  }
  }
  
  </code></pre>
  
  <p>WebException: The remote server returned an error: (404) Not found.</p>