cancel
Showing results for 
Search instead for 
Did you mean: 

SFTP sender adapter filename in regular expression

Former Member
0 Kudos

Hi everybody,

we are in PI 7.11 SP10,

The adapter SFTP is installed.

With the same connector sender , I want to pick up 3 file with the pattern

VIR_FR_TOB*.txt

ENC_FR_TOB*.txt

CONTRACTEND_TOB*.TXT

there are other TXT file on the same site but they won't be picked up.

I'm not specialist in regular expression.

Can someone help me to translate these 3 files type to regular expression?

If I put a complete name of a file ( VIR_FR_TOB_20121012.txt), it is recognized but if I put a name like VIR_FR_TOB*.txt, the adapter doesn't see the file..

Thanks in adavnce for your collaboration.

Eric Koralewski

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Try it with the following

VIR_FR_TOB.*\.txt|ENC_FR_TOB.*\.txt|CONTRACTEND_TOB.*\.TXT

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Eric,

Would TOB be the pattern for files related to your your scenario?

What is the result if you just use: VIR_FR_TOB (an nothing else)?, TOB should work fine too if that is the pattern you would look for.

You can follow some guidance here:

http://scn.sap.com/thread/3243265

There's a reference to a regex test tool to test your expression against the filename, if it returns TRUE it normally works fine in the comm channel.

Regards, Trevor

iaki_vila
Active Contributor
0 Kudos

Hi Eric,

If I put a complete name of a file ( VIR_FR_TOB_20121012.txt), it is recognized but if I put a name like VIR_FR_TOB*.txt, the adapter doesn't see the file..

This a weird issue, are you sure that you are respecting the upercase name, or there some letters in lowercase?, do you know what sftp server is?, not all servers are supported by SAP.

Regards.

nageshwar_reddy
Contributor
0 Kudos

Hi Eric,

You need to analyze all the files available in the directory before coming up with a regex. Find a unique way of identifying the files that you want to process. Once you do that then you can get a regular expression that works. For example if _TOB*.txt identifies the set of files that you want to process, then *_TOB*.txt* should do the trick for you.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

You can try this pattern too

*TOB*.txt  or  *.txt

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Eric,

try using *.* .