title: How to list only certain files in R?
body: <p>I have thousands of different files (having the same extension <code>.img</code>) in a folder called <code>data</code>. If I use this :</p>
  
  <pre><code> dir&lt;- list.files ("C:\\Users\\data", "*.img", full.names = TRUE)
  </code></pre>
  
  <p>It will list all files I have in the folder <code>data</code>.</p>
  
  <p>What I need is just to list the files named as:</p>
  
  <pre><code> File_yyyymmdd_data.img     (in which yyyymmdd varies for 10 years)
  </code></pre>
  
  <p>Any idea or hint is appreciated!</p>