Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


K Craig
2020-07-24T17:40:14Z
I have files that get rename after they're processed to something like this: FileOne_202007241237.txt
The files can have any number of different extensions.
I need to move and rename the files, without the dateTime part for reuse with a different process.
So FileOne_20200724123.txt needs to become FileOne.txt

I need to do this en masse using a regex for the date time part so that I can rename and move all at the same time.

Any thoughts?
Sponsor
Forum information
Gary_W
2020-07-24T18:43:02Z
This "remembers" only the parts before the underscore and the extension, then puts them back together, leaving out the underscore and anything after it until the extension:

{REGEX(Replace|FileOne_20200724123.txt|(.*)_.*(\..*)|$1$2)}

Assumes only one underscore.
Scroll to Top