Rename yesterdays file and remove part of filename.

Post variable and regex related tips, questions.

Rename yesterdays file and remove part of filename.

Postby Tech Support » Sat May 11, 2019 11:17 am

User support request:
I need to rename yesterdays files only, and also remove the last part before extension.

The file date will always be yesterday’s date or T-1 as seen in the files below
xxx_yyyyyyyyyy_20190503_154805.csv
The ending file name should just be “xxx_yyyyyyyyyyy_YYYYMMDD.csv”
Tech Support
Site Admin
 
Posts: 1231
Joined: Thu May 25, 2006 11:12 am

Re: Rename yesterdays file and remove part of filename.

Postby Tech Support » Sat May 11, 2019 11:18 am

Use Copy Task
Make sure to select option – RENAME FILES.

Filename field should be:
xxx_yyyyyyyyyy_$%DATEADDX::YYppdd::dd::-1%$

Rename field should be
([0-9a-zA-Z]{1,})<GROUP>group1_group2_group3.group5
Tech Support
Site Admin
 
Posts: 1231
Joined: Thu May 25, 2006 11:12 am


Return to Variables and Regular Expressions

Who is online

Users browsing this forum: No registered users and 0 guests

cron