title: Copy files by extension in VS Code tasks.json
body: <p>I want to copy, recursively, all files from /src with the extension .json to my /out directory. I currently copy all files in my static folder (regardless of extension) like this, in tasks.json</p>
  <pre><code>{
      &quot;version&quot;: &quot;2.0.0&quot;,
      &quot;tasks&quot;: [
          {
              &quot;type&quot;: &quot;shell&quot;,
              &quot;label&quot;: &quot;copyStatic&quot;,
              &quot;command&quot; : &quot;cp&quot;,
              &quot;args&quot;: [&quot;-f&quot;, &quot;-r&quot;, &quot;${workspaceFolder}/src/static&quot;, &quot;${workspaceFolder}/out/&quot;],
          }
      ]
  }
  </code></pre>
  <p>I tried using the /**/ notation I'd seen elsewhere like this</p>
  <pre><code>{
      &quot;version&quot;: &quot;2.0.0&quot;,
      &quot;tasks&quot;: [
          {
              &quot;type&quot;: &quot;shell&quot;,
              &quot;label&quot;: &quot;copyJson&quot;,
              &quot;command&quot; : &quot;cp&quot;,
              &quot;args&quot;: [&quot;-f&quot;, &quot;-r&quot;, &quot;${workspaceFolder}/src/**/*.json&quot;, &quot;${workspaceFolder}/out/&quot;],
          }
      ]
  }
  </code></pre>
  <p>But it didn't work - got an error <code>cp: /src/**/*.json: No such file or directory</code></p>
  <p>Any ideas how to do this in tasks.json? I want to deep copy so include files like</p>
  <pre><code>/src/foo.json --&gt; /out/foo.json
  /src/folder/bar.json --&gt; /out/folder/bar.json
  </code></pre>
  <p>Thanks</p>