Trying to normalize pattern with date and rest of filename

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Hi guys & gals,

I have lots of files named like this:
2019-09-19_some-weird__file_name.pdf

What I want to achieve:
2019-09-19--some-weird__file_name.pdf

This is what I tried:
if
Name -> does not match -> (o Date Pattern)--(...)
then
Rename -> with pattern -> (o Date Pattern)--(name)(extension)

However this is the result:
--2019-09-19_some-weird__file_name.pdf

I was expecting the Date Pattern to be matched and "extracted" from name, and the remainder of name to be available within (name), but that does not seem to be how it works...

Please help :)
Thx!!
Chris
Wirsing84
 
Posts: 2
Joined: Tue Nov 09, 2021 6:27 pm

Don't you want _ in the match patterns and not --? Also, you need another custom attribute to grab the second part. (name) is the whole name including the date. If you only want that end part, you need to capture that into a custom attribute by itself.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support