Skip to Content

DynamicAttributeChangeBean Clarification - Determine the target folder based on the dynamic values contained in the file name

Hi All.

i'm referring DynamicAttributeChangeBean - The no-mapping solution to changing Dynamic Configuration ... dynamically! and i achieved my renaming the passthrough scenario with a help of the DACB module. and i would link to appreciate the effort of Eng swee Yeoh.

and i have some other scenario as well. can any one please suggest is below feature is available or not.

in mentioned link Scenario 5, if my case is Partner1_002_InvoiceNumber123.xml (ie invoice number) is unique, what setup has do be done, i tried it but not getting, if give the default prefix and post-fix only it's taking.

my requirement is

expected file name





target folder is

/Target/file/SOUTH (both WPS_SOUTH_388_SH010060030008.xml.asc and WPS_SOUTH_389_SH010060030009.xml.asc file to be placed)

/Target/file/NORTH (both WPS_NORTH_388_SH010060030009.xml.asc and WPS_NORTH_389_SH010060030010.xml.asc file to be placed)

if i give regex: WPS_(\d+)_388_SH010060030008.xml.asc only the file which has the same prefix and postfix is taking. i tried with wild (*)char as well it's not working.

how can i route to this, can you please suggest whether it can be achieved or not.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jul 26, 2016 at 05:49 AM

    Hi Ramesh

    Yes, the "regex" mode can be used to achieve your requirement. Instead of giving you the fish and have you come back for more later, I'd prefer to teach you to fish instead. As such, I'd suggest that you read up on regex, i.e. regular expressions. There are even sites below that you can use to test your regex as well as provide you cheatsheets for commonly used regex expressions.

    Regex Tester - Javascript, PCRE, PHP

    RegExr: Learn, Build, & Test RegEx

    Several hints for you

    • \d is for matching digits and will not match SOUTH or NORTH
    • Try to not hard code the trailing section of your filename (i.e. 388_SH010060030008.xml.asc) but instead represent it as a dynamic regular expression.


    Eng Swee

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.