title: How to delete strings after certain character in multiple files using batch?
body: <p>I have been trying to delete some characters after _1 and rename the file but got stuck. let me put in sample file names to make it clear.</p>
  
  <pre><code>aero_name_1_3_7.png
  glik_trol_1_5_2_9_5.png
  this_that_1_3_1_9.png
  ....... and so on. 
  </code></pre>
  
  <p>So my filenames contain exact format but different names and hence I thought to use tokens and delims. After renaming my files should look aero_name_1.png, glik_trol_1.png, this_that_1.png
   Here is the piece of bat that I wrote but this does not work. If someone could suggest, that would be great.</p>
  
  <pre><code>for /F "tokens=1-4,* delims=_" %%a in ('dir /A-D /B "*.png"') do (
    move "%%a_%%b" "%%a%%~xb"
  )
  </code></pre>
  
  <p>Thanks</p>