title: Extract directory from path
body: <p>In my script I need the <strong>directory</strong> of the file I am working with.  For example, the <em>file</em>=<strong>"stuff/backup/file.zip"</strong>. I need a way to get the string "<strong>stuff/backup/</strong>" from the variable <code>$file</code>. </p>