title: Delete only .jpg files from folder in android
body: <p>This is any way to delete only .jpg files from folder?
  This is my remove method:</p>
  
  <pre><code>if (dir.isDirectory()) {
          String[] children = dir.list();
          for (int i = 0; i &lt; children.length; i++) {
              new File(dir, children[i]).delete();
          }
      }
  </code></pre>
  
  <p>How can I remove only .jpg files from folder?</p>