title: Check if folder based on variables exists
body: <p>I'm creating a bash script, but it does not seem to check if a folder exists, when it's based on variables. Although the folder does exists, when I cd into it.</p>
  <pre><code>#!/usr/bin/env bash
  
  VAR1=&quot;/Users/nameuserhere/Desktop/&quot;;
  VAR2=`date &quot;+%Y-%m-%d&quot;`;
  VAR3=&quot;$VAR1$VAR2&quot;;
  
  echo &quot;folder path: $VAR3&quot;;
  
  if [[ -f &quot;$VAR3&quot; ]]
  then
    echo &quot;this/not does exists&quot;
  else
    echo &quot;this/not does not exist&quot;
  fi
  </code></pre>