title: Launch Spark-Shell (Scala) from Windows and Set Working Directory Path
body: <p>I've installed Spark using RStudio's sparklyr package, and returned the path via:</p>
  
  <pre><code># library(sparklyr)
  # spark_home_dir()
  </code></pre>
  
  <p>Now I want to launch the <code>spark-shell</code> from Windows command shell, and this works fine.</p>
  
  <pre><code>start C:\\Users\\eyeOfTheStorm\\AppData\\Local\\rstudio\\spark\\Cache\\spark-2.0.0-bin-hadoop2.7\\bin\\spark-shell
  </code></pre>
  
  <p>But when I try to set the working directory to my desktop, so I can read files from there, it doesn't point correctly using <code>:load</code> to point to the working directory.</p>
  
  <pre><code>start C:\\Users\\eyeOfTheStorm\\AppData\\Local\\rstudio\\spark\\Cache\\spark-2.0.0-bin-hadoop2.7\\bin\\spark-shell :load C:\\Users\\eyeOfTheStorm\\Desktop\\WorkingDir
  </code></pre>
  
  <p>And from Scala, this should confirm the working directory as Desktop...</p>
  
  <pre><code>def pwd = System.getProperty("user.dir"); println(pwd)
  </code></pre>
  
  <p>But it only returns <code>C:\Users\eyeOfTheStorm</code>. I would like it to return <code>C:\\Users\\eyeOfTheStorm\\Desktop</code>. Any idea how to do this in a single Windows command?</p>