rename file from variable date to fixed name

Post variable and regex related tips, questions.

rename file from variable date to fixed name

Postby melvin » Fri Apr 03, 2015 6:25 am

User support Request:
I have one Rename Task that works but I can't get this one to work.
When it saves the file in the location it leaves the full filename in tact instead of renaming it.
The filename it pulls is: "CASE_DATA_$%DATE::pp%$$%DATE::dd%$$%DATE::yy%$*dat"
Example Filename For previous sentence: "CASE_DATA_040215-13_00.dat"
I want it to rename to: "CASE_DATA.dat"
melvin
Site Admin
 
Posts: 979
Joined: Thu May 25, 2006 10:20 am
Location: Santa Barbara, california

Re: rename file from variable date to fixed name

Postby melvin » Fri Apr 03, 2015 6:26 am

For your filename field entry, use:
REGEXF=CASE_DATA_$%DATE::ppddyy%$-[0-9]{1,}_[0-9]{1,}.dat

For rename field, use:
CASE_DATA.dat
melvin
Site Admin
 
Posts: 979
Joined: Thu May 25, 2006 10:20 am
Location: Santa Barbara, california


Return to Variables and Regular Expressions

Who is online

Users browsing this forum: No registered users and 1 guest

cron