cancel
Showing results for 
Search instead for 
Did you mean: 

Maintaining .txt extension while zipping multiple files

Former Member
0 Kudos


Hello gurus

The case is as follows:

8 .txt files are picked by PI and zipped into a folder containing all 8 files and dumped into another system.

8 files --> 1 zip file : 8 files.

The problem is  the files donot have the extension (.txt). As a result, client on the target system cannot open the files directly but select openwith-->notepad to access the data.

How can we maintain .txt extension for the files??

Please help.

Regards,

Xineohpi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

How are u zipping the 8 files in PI??

Are u using java mapping or standard payload zip bean or any module ?

Former Member
0 Kudos

Hi Indrajit

Using module localejbs/Seeburger/Zip.

Regards,

Xineohpi

Answers (2)

Answers (2)

Former Member
0 Kudos

Sender cc parameters-->filelist

file1.type txt

file1.namePart "file.TXT"="file1.TXT"

file1.optional NO

file2.namePart "file.TXT"="file2.TXT"

file2.optional NO

file2.type txt

Sender cc module processing seq

1 localejbs/Seeburger/CharsetConversion Local Enterprise Bean     conversion

2 AF_Modules/MessageTransformBean Local Enterprise Bean        trans

3 CallSapAdapter Local Enterprise Bean                                               0

Sender cc module config

conversion          targetEnc          UTF-8

trans                    Transform.ContentType     text/plain

receiver cc module processing seq

1 localejbs/Seeburger/PayloadInfo Local Enterprise Bean                     info

2 localejbs/Seeburger/CharsetConversion Local Enterprise Bean           conversion

3 localejbs/Seeburger/Zip Local Enterprise Bean                                    Szip

4 localejbs/Seeburger/AttribMapper Local Enterprise Bean                     map

5 CallSapAdapter Local Enterprise Bean                                                   0

receiver cc module config

Szip mode zip

Szip sourceDest0 file

Szip sourceDest1 file1

..

..

Szip sourceDest7 file7

conversion sourceDest MainDocument

conversion targetDest file

This is the existing configuration. Can i add/edit something in the module to get the desired output?

Also i forgot to mention we are using NFS adapter in sender cc and FTP adapter in receiver cc.

Message was edited by: Xineohpi Iphoenix

iaki_vila
Active Contributor
0 Kudos

Hi  Xineophi,

If you only take files from one location and zip them to another location you can use the payloadzipbean module like Stefan Grube explains


If you need treatment in the ESR, the better way in my opinion is using a java mapping. You can check

Former Member
0 Kudos

Hi Iñaki Vila

Thanks for your response.

I did go through the mentioned links before posting here.

But Stefan's blog describes procedure for 1 file. how do i go about for all eight?

Indrajit's thread would mean changing the mapping and interfaces all together. Just wanted to check if this is necessary.

Regards,

Xineohpi

iaki_vila
Active Contributor
0 Kudos

HI Xineophi,

In Stefan's blog if you read the parameters you can use zip.mode equal to zipAll. May be Suraj S.R. 's blog could help you better.


Regards.

Former Member
0 Kudos

Hi Iñaki Vila

thanks for the link. i need 8 different files in target.

Regards,

Xineohpi