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


Bob Flanagan III
2012-05-11T16:00:44Z
I am trying to rename a file

eg ABCD123456 where ABCD is a constant and 123456 is a variable

to be DCBA123456

How do I extract 123456 from the original file name?

Thanks in advance.
Sponsor
Forum information
Support
2012-05-14T09:37:14Z
Is the constant of fixed length?

We may need a regex expert here for the best solution. I guess there are a lot of forums for that. Once you have the regex you can easily extract this and modify it the way you like.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
trevinom
2012-05-28T10:19:43Z
I had kinda the same question, Bob. My string was: CCYYMMDDOP520MMDDCCYY
I wanted the first 8 characters stripped away so that I ended up with : OP520MMDDCCYY

Support suggested the following
New name mask could be:

{STRING(Remove|{NEWNAME()}|0|8)}

so, for you, it looks like it should be:
{STRING(Remove|{NEWNAME()}|0|4)}

I will try this tomorrow.
Bob Flanagan III
2012-05-28T10:56:50Z
DCBA{STRING(Right|{STRING(Replace|{NEWNAME()}|oldValue|newValue)}|6)}.DAT

I found that this worked in the end.
Scroll to Top