title: How to do mkdir with a path that has spaces?
body: <p>I have a bash beginner problem:<br>
  My path to be created is <code>/Volumes/ADATA\ UFD/Programming/Qt</code>, where <code>/Volumes/ADATA\ UFD</code> exists already. I'd like to write a script in the following form:</p>
  
  <pre><code># create a single output directory 
  outputdir="/Volumes/ADATA\ UFD/Programming/Qt"
  mkdir -pv $outputdir
  </code></pre>
  
  <p>My problem is that <code>mkdir</code> creates the directory <code>/Volumes/ADATA</code> and <code>./UFD/Programming</code> instead of creating <code>/Volumes/ADATA\ UFD/Programming/Qt</code>.</p>
  
  <p>I have looked at <a href="https://stackoverflow.com/q/589149/1705967">this question on SO</a>; however, none of these solutions worked:</p>
  
  <pre><code>outputdir=/Volumes/"ADATA\ UFD/Programming/Qt"
  mkdir -pv $outputdir
  
  outputdir=/Volumes/'ADATA\ UFD/Programming/Qt'
  mkdir -pv $outputdir
  
  outputdir='/Volumes/ADATA\ UFD/Programming/Qt'
  mkdir -pv $outputdir
  
  outputdir=/Volumes/ADATA' 'UFD/Programming/Qt
  mkdir -pv $outputdir
  </code></pre>
  
  <p>What am I doing wrong? What is the good combination here?</p>