# C1.Zip.C1ZipEntryCollection.AddFolder

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Zip_C1ZipEntryCollection_AddFolder_" data-uid="C1.Zip.C1ZipEntryCollection.AddFolder*">AddFolder Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Zip_C1ZipEntryCollection_AddFolder_" data-uid="C1.Zip.C1ZipEntryCollection.AddFolder*"></a>
<h4 id="C1_Zip_C1ZipEntryCollection_AddFolder_System_String_" data-uid="C1.Zip.C1ZipEntryCollection.AddFolder(System.String)">AddFolder(string)</h4>
<div class="markdown level1 summary"><p>Adds the content of a folder to the current zip file.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AddFolder(string path)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AddFolder(path As String)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">path</span></td>
      <td><p>The full path of the folder to be added to the zip file.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Zip_C1ZipEntryCollection_AddFolder_System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method adds all files and sub folders to the zip file.</p>
</div>


<a id="C1_Zip_C1ZipEntryCollection_AddFolder_" data-uid="C1.Zip.C1ZipEntryCollection.AddFolder*"></a>
<h4 id="C1_Zip_C1ZipEntryCollection_AddFolder_System_String_System_String_" data-uid="C1.Zip.C1ZipEntryCollection.AddFolder(System.String,System.String)">AddFolder(string, string)</h4>
<div class="markdown level1 summary"><p>Adds the content of a folder to the current zip file.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AddFolder(string path, string searchPattern)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AddFolder(path As String, searchPattern As String)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">path</span></td>
      <td><p>The full path of the folder to be added to the zip file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">searchPattern</span></td>
      <td><p>A mask that specifies which files to add.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Zip_C1ZipEntryCollection_AddFolder_System_String_System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the folder contains sub folders, those are also added to the zip file.</p>
</div>


<a id="C1_Zip_C1ZipEntryCollection_AddFolder_" data-uid="C1.Zip.C1ZipEntryCollection.AddFolder*"></a>
<h4 id="C1_Zip_C1ZipEntryCollection_AddFolder_System_String_System_String_System_Boolean_" data-uid="C1.Zip.C1ZipEntryCollection.AddFolder(System.String,System.String,System.Boolean)">AddFolder(string, string, bool)</h4>
<div class="markdown level1 summary"><p>Adds the content of a folder to the current zip file.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AddFolder(string path, string searchPattern, bool includeSubfolders)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AddFolder(path As String, searchPattern As String, includeSubfolders As Boolean)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">path</span></td>
      <td><p>The full path of the folder to be added to the zip file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">searchPattern</span></td>
      <td><p>A mask that specifies which files to add.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">includeSubfolders</span></td>
      <td><p>True to include sub folders, false to include only files at the root level.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
