cancel
Showing results for 
Search instead for 
Did you mean: 

File sender adapter (FTP) regular expressions

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

iaki_vila
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

Harish
Active Contributor
0 Kudos

I think the limitation of 8 char is not working, if you remove the 8 then it should work

ABC_[0-9].date

Former Member
0 Kudos

Hi Harish,

ABC_[0-9].dat is not working.

Thanks.

former_member184720
Active Contributor
0 Kudos

AFAIK - You can only have the place holders but not the regular expression in File adapter.

You could try ABC_????????.dat and see if that helps

RaghuVamseedhar
Active Contributor
Harish
Active Contributor
0 Kudos

Hi,

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


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

Former Member
0 Kudos

Tested and not working...