Skip to Content

Picking up multiple files from location and putting it to another location with additional logic

Jan 16, 2017 at 02:58 PM


avatar image


I have a requirement where I need to pick multiple files from one location and put that files to another location. In source folder there is a set of file pairs - xxx.txt and xxx.pdf. In target folder I need to get all .pdf files from source folder and one .txt file containing the accumulated contents of all source .txt files.

What is the best way to implement this scenario in PI?

Regards, Evgeniy.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Manoj K Jan 16, 2017 at 06:32 PM

Hi Eve,

Are u planning to pick all the file in one go for ex: you have 5 .txt file and .pdf files then you want to pick all 10 file in one go ?

Here is what i did .

Pick .pdf file as attachment and .txt as mainfile. (Set ASMA in sender channel for filename/BaseFileName)

In Reciver channel don't use ASMA for the main filename mention some constant as you need to append the content of all .txt files.

And currently i dont have SAP's SFTP adapter this to try out i have tested this with Advantco's . So i believe to retain attachment name with SAp's SFTP you need to have parameter retain/ = true. And set construction mo0de to append.

Sender Folder : I have 2 txt file and two corresponding PDF files.

Now in target i need to have 2 PDF files and a single txt file with content appended.



pic1.png (6.6 kB)
pic2.png (6.3 kB)
pic3.png (5.7 kB)
pic4.png (4.6 kB)
10 |10000 characters needed characters left characters exceeded
Evgeniy Kolmakov Jan 16, 2017 at 08:19 PM

Hi Manoj!

Thanks for your answer. Actualy, your decision is number one in my own priority list :-)

I'd just want to know if there is any other approach for this kind of scenario.

Regards, Evgeniy.

10 |10000 characters needed characters left characters exceeded