Skip to Content

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

Hi!

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • 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/attachment.name = 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.

    Br,

    Manoj

    Add comment
    10|10000 characters needed characters exceeded

  • 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.

    Add comment
    10|10000 characters needed characters exceeded