title: Cloud Functions Delete a Folder: TypeScript
body: <p>My storage bucket <code>budget-32bfc</code> contain the following folders;<br/>
  <code>--+ Folder1
  --+ Folder2
  --+ Folder3</code></p>
  
  <p>I want to <strong>delete <em>Folder1</em></strong> from Cloud Functions.</p>
  
  <p><strong>ATTEMPT 1:</strong><br/>
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>gcs.bucket("budget-32bfc").file('Folder1').delete().then(() =&gt; {
          console.log("Folder Deleted");
      }).catch(function (error) {
          console.log("Error listing users:", error);
      });</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>ATTEMPT 2:</strong><br/></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>admin.bucket("budget-32bfc").file('Folder1').delete().then(() =&gt; {
          console.log("Folder Deleted");
      }).catch(function (error) {
          console.log("Error listing users:", error);
      });</code></pre>
  </div>
  </div>
  </p>
  
  <p>Both attempt gave me a <code>404 Error: 'No such object: budget-32bfc/Folder1'</code>.</p>
  
  <p>How do I delete a folder??</p>