title: Zip a parent directory with files and child directories in .NET Framework
body: <p>Is there a way to ONLY zip files and directories at the same time. I was using ZipArchive but is not working for Directories. The directory that I want to add in the Zip file has more directories and a zip file inside, so it's a nested directory. Can someone please assist.  </p>
  
  <pre><code>using (ZipArchive zipArchive = ZipFile.Open(zipFilePath, ZipArchiveMode.Create))
       {
        foreach (FileInfo file in filesToZip)
        {
         zipArchive.CreateEntryFromFile(Path.Combine(filePath, file.Name), file.Name);
        }
       }
   }
  </code></pre>