Hi klewis10367,
What you can do is as follows:
Use the rename file task.
You could use a file mask to be sure of the file name convention (is regex):
.{4}~-(.{4}~){3}.{4}\.pdf
In the rename setting we only check the Post Process checkbox and also uses some regex:
{REGEX(MatchGetGroup|{NEWNAME()}|(.{4})~-((.{4}~){3}.{4}\.pdf)|
1)}
delimiter {REGEX(MatchGetGroup|{NEWNAME()}|(.{4})~-((.{4}~){3}.{4}\.pdf)|
2)}
What is happening here?
{REGEX(MatchGetGroup|{NEWNAME()}|(.{4})~-((.{4}~){3}.{4}\.pdf)|1)}
From the newname, which still is the original name, use the regex (.{4})~-((.{4}~){3}.{4}\.pdf)
Using the () I split the filename in groups, (.{4}) is group 1 and ((.{4}~){3}.{4}\.pdf) is group 2
The ~- is not in a group, I excluded them.
I placed group 1 first, than the new dilimiter and than group 2. This will rename the file with only a new delimiter after the 1st XXXX.
So this is your solution:
{REGEX(MatchGetGroup|{NEWNAME()}|(.{4})~-((.{4}~){3}.{4}\.pdf)|1)}
~{REGEX(MatchGetGroup|{NEWNAME()}|(.{4})~-((.{4}~){3}.{4}\.pdf)|2)}
Sure, there are more solutions to this, this is just one of them.
Regards
Erik
Edited by user
2017-09-07T06:15:49Z
|
Reason: Not specified
Uses Visualcron since 2006.