cancel
Showing results for 
Search instead for 
Did you mean: 

How to achieve the "Advanced Selection of Source File" with the new SAP sFTP adapter?

arijit_mukherjee2
Participant
0 Kudos

Dear Experts,

I have to pick two different type of files(say ABC.xml and DEF.xml) from an sFTP server by sender SAP sFTP adapter. Both the files resides in the same directory.Earlier we used to do select "Advanced Selection of Source File" to pick additional file which we want to process normally but this option is not present in the new SFTP adapter.

The option "Additional File" is present however as far as I know that is used when we want to pick additional file as attachment. In my case this is not the requirement.

Appreciate you help!!

Regards,

Arijit

Accepted Solutions (1)

Accepted Solutions (1)

former_member184720
Active Contributor
0 Kudos

Hi Arjit - The good thing is that SAP SFTP adapter support regular expressions in the file name.

You can try something like shown below screenshots

Reference : http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/04/11/sap-sftp-sender-adapter-a-quick-w...

arijit_mukherjee2
Participant
0 Kudos

Hi Hareesh,

I have two requirement.Here are they.

Case1: I need to pick all the files from a directory where the file name will be like "ABCyyyyMMdd.xml".

Can you please let me know the file name schema I should write for this?

Case2: I need pick both the files like below from same location.File names are:

UKONG*AGYLK*

UKONG*AGJKL*

Can you please let me know the file name schema I should use for this case?

Appreciate your help!!

Thanks,

Arijit

former_member184720
Active Contributor
0 Kudos

Hi Arjit - Case 1 : [ABC].*xml

Case 2 :

(UKONG.*AGYLK.*)|(UKONG.*AGJKL.*)

Answers (2)

Answers (2)

Former Member
0 Kudos

HI Arijit,

You can try the below regular expression in SFTP Sender channel to pickup all the files in your source directory

In Case if you want to pick only .xml files give filename as ".+\\*.xml". It will pick all the XML files.

This regular expression will works for every file, even though the filename contains any special characters.

please try and let me know if any issues.

Thanks,

Prasad.

arijit_mukherjee2
Participant
0 Kudos

Hi Prasad,

I have two requirement.Here are they.

Case1: I need to pick all the files from a directory where the file name will be like "ABCyyyyMMdd.xml".

Can you please let me know the file name schema I should write for this?

Case2: I need pick both the files like below from same location.File names are:

UKONG*AGYLK*

UKONG*AGJKL*

Can you please let me know the file name schema I should use for this case?

Appreciate your help!!

Thanks,

Arijit

former_member223322
Active Participant
0 Kudos

Try using 'Additional Files' option.

~Srini