title: Using wildcards with scala.sys.process._ in Scala
body: <p>I am trying to use <code>scala.sys.process._</code> package to copy all files from one directory to another in scala like so:</p>
  <pre><code>s&quot;cp -R $testDir/data/* $dataDir/&quot;.!!
  </code></pre>
  <p>But I keep getting following error:</p>
  <pre><code>[error] cp: cannot stat '/tmp/data/*': No such file or directory
  </code></pre>
  <p>If I don't put <code>*</code> then whole <code>data</code> directory is getting copied to the destination folder which is not what I want!</p>
  <p>The files in the <code>data</code> directory are gzip files which I need to further uncompress like so:</p>
  <pre><code>s&quot;gunzip $dataDir/data/*&quot;.!!
  </code></pre>
  <p>But even this throws similar error.</p>
  <p>How can I use <code>*</code> in commands using <code>scala.sys.process</code> in Scala?</p>