Removing Datestamp from a Decrypted file set

Post any question you may have in regards to GoAnywhere MFT and let our talented support staff and other users assist you.
If you need a quicker response, please create a support ticket via the customer portal my.goanywhere.com or contact our support team by email at [email protected].
2 posts Page 1 of 1

ICDCAG

Posts: 3
Joined: Mon Oct 03, 2016 9:27 am

Post by ICDCAG » Mon Oct 03, 2016 11:53 am
Hello,

I've got 2 incoming .txt files that need the timestamp removed from the middle of it.

ex. CUSTOMER_66772-01_DEFERRAL_20160929040542.txt
to
CUSTOMER_66772-01_DEFERRAL.txt

I've been looking at the rename command, but I'm not sure about the best way to do this with a File set under the rename command. I'm archiving the file set before this rename, so over writing shouldn't be an issue

Anyone have some insight?

Support_Rick

Support Specialist
Posts: 590
Joined: Tue Jul 17, 2012 2:12 pm
Location: Phoenix, AZ

Post by Support_Rick » Tue Oct 04, 2016 4:21 am
If the position of the timestamp is constant, just do substrings...

${ Concat( Substring(filename, 1, 26), '.txt' ) }

Otherwise, check into the "positionof" and look for the 2nd underscore, then work with the relative positions of the timestamp date.
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
2 posts Page 1 of 1