title: Selecting latest file from a folder and copy it to another file using powershell script
body: <p>I am new to powershell scripts and need some help. </p>
  
  <p>We have a folder <code>\Output</code>. It will have the files in following format :</p>
  
  <pre><code>abc_1.dat
  abc_2.dat
  xyz_1.dat
  abc_3.dat
  pqr_2.dat
  ......
  </code></pre>
  
  <p>Now I want to find the latest file starting with "abc" (e.g., abc_3.dat) and copy the data to abc.dat. Similarly for xyz and pqr. These files will keep on being added.</p>