rename a file with varying date in filename

Post variable and regex related tips, questions.

rename a file with varying date in filename

Postby melvin » Thu Mar 06, 2014 6:57 am

User support request:
I am working with Automize 9 for the first time.
I trying to rename a copied file .
The file name is going to vary every day due to the date being in the front of the file name. EXAMPLE 012414JBE MMDDYYJBE is always going to be file name. I want to rename this file name to MHM.TXT.
I do not know what to put in the file name filed. I have put. If you could give me examples that would be a great help.
I can get the file copied to target folder. I can not be the file to rename .
melvin
Site Admin
 
Posts: 979
Joined: Thu May 25, 2006 10:20 am
Location: Santa Barbara, california

Re: rename a file with varying date in filename

Postby melvin » Thu Mar 06, 2014 6:57 am

for the filename field use:
REGEXF=[0-9]{1,}JBE

In regex, [0-9] matches any number
{1,} means one of more of the preceding clause (i..e [0-9])
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