title: SSIS Rename files by replacing part of filename
body: <p><a href="https://i.stack.imgur.com/UC5Hu.png" rel="nofollow noreferrer">Remove the circled part of the filename</a></p>
  
  <p>There are two types of files in folder x:\abc\sales\
  one is a compressed .gz file and the other is uncompressed .txt file
  My aim is to rename all the ".txt" files:(leaving the .gz files untouched)
  Eg. "accn_adjustments_201802020147.txt"</p>
  
  <p>The part after the underscore is basically date and time, the time is not always "0147", it could be "0148" or "0210" or anything else, but always 4 digits...
  My task is to remove the last 4 digits so the end result would look something like "accn_adjustments_20180202.txt"</p>
  
  <p>I would think either for-each loop or script task can help me solve this issue but I don't know how to go about it.</p>
  
  <p>Any help is appreciated, thanks in advance...</p>