Skip to Content
author's profile photo Former Member
Former Member

File sender adapter (FTP) regular expressions

Hi everybody,

I Need to pick files with this format: "ABC_12345678.xml". (exactly 8 digits)

I'm trying to achieve this requirement with "File Name Mask" in the file adapter.

Regular expressions like "ABC_[0-9]{8}.dat" or "ABC_\d{8}.dat" seems not to work.

Does File adapter supports regular expressions? STFP is not available in my PI.

Currently i'm using "ABC_*.xml" in order to pick the files but i need to restrict more than that because files like 'ABC_ABC.xml' fix the pattern

Any solution?

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on May 12, 2015 at 10:45 AM

    Hi,

    I see the issue with extension in regular expression, can you try the below Regular expressions


    "ABC_[0-9]{8}.xml"

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 12, 2015 at 10:57 AM

    Files with format "ABC_12345678.dat" not "ABC_12345678.xml", the extension is wrong in the OP.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 12, 2015 at 09:13 PM

    Hi José Miguel,

    I think Hareesh Game give to you a good way to restrict your selection. Also, you can try with OS command before or after, depending if you can use regular expressions with a ftp command (im not sure) or to delete the file that doesn't fill the regular expression.

    Check this wiki: SAP XI File Adapter OS Command Line Feature - Process Integration - SCN Wiki

    And may be this link could be helpful if you are under UNIX system: Learn Linux, 101: Search text files using regular expressions

    Regards.

    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.