Remove the circled part of the filename
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"
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"
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.
Any help is appreciated, thanks in advance...