cancel
Showing results for 
Search instead for 
Did you mean: 

Take 2 files with same name with File/FTP Sender Adapter in PO

iker_espinosa
Participant
0 Kudos
343

Hi,

I would like to take 2 files with same name but different extension from a folder in SFTP.

In that FTP folder we will have lots of pair files, for example 5 PDFs and 5 XMLs. Each pair of PDF + XML has same name:

File1.PDF

File1.XML

File2.PDF

File2.XML

...

What we need to do is to take every pair with same name: 1 PDF + 1 XML (File1.PDF + File1.XML), leaving in the folder the other 4 PDFs + 4 XMLs. We will take the other pairs next time.

Is this possible?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

iker_espinosa
Participant
0 Kudos

Is it not possible with "namePart" attribute?

https://help.sap.com/viewer/5cf7d2de571a45cc81f91261668b7361/7.3.20/en-US/44692ab8a4b633eae10000000a...

I will try that before developing custom adapter module.

Thanks.

adam_kiwon3
Active Participant

Of course, this is the standard feature of handling additional files.

The XML is then ideally the main payload and the PDF will be handled as an attachment.

Answers (3)

Answers (3)

m_radziewicz_ey
Explorer
0 Kudos

Hi Iker,


If the goal is to process the files in pairs - then use the correlation functionality to match them.

If you want to keep an order - still some queing may be helpful

Harish
Active Contributor
0 Kudos

Do you have a fixed file name for all the pairs and do you have a fixed number of pairs?

name part will work to pick two different naming formats of files, so a good fit for .xml and .pdf for a similar filename.

regards,

Harish

Harish
Active Contributor
0 Kudos

Hi,

This is not possible with the standard adapter configuration, there are two ways to achieve this

1. Custom adapter module

OR 2. script run before the pick of file

The script can club the files into Process and main folder on every run and only process folder files are picked up by the channel.

regards,

Harish