title: How to remove file using a task gradle
body: <p>I'm trying to remove a file using a gradle task</p>
  <pre><code>task remove {
      exec {
          working dir file/file2
          commandLine 'myFirstCommandLineWhichWorks'
          commandLine &quot;rm&quot;, &quot;'myFile.txt'&quot;
      }
  }
  </code></pre>
  <p>and I got error &quot;A problem occurred starting process 'command 'rm'&quot;</p>
  <p>Note: I don't want to use <code>task something(type: Delete)</code> and no external scripts.
  it must be from commandLine.
  There is a possibility ?</p>