cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic file Directory : Sender File Adapter

former_member192079
Participant
0 Kudos

Hi all

In one of our interface development ,at we require a dynamic Directory path at the sender file adapter ..

ex :

path = Root/A/B/C

filename = test.txt

now in Root Directory, Folder & subfolder " A ( B ( C ))) are dynamic.

Subfolder "C" wil contain the source file..

Will it possible...with Z module development..??

Regards,

Ashutosh

Accepted Solutions (1)

Accepted Solutions (1)

prateek
Active Contributor
0 Kudos

Use DynamicConfiguration using Adapter-Specific Message Attributes

Regards,

Prateek

Answers (5)

Answers (5)

former_member192079
Participant
0 Kudos

Closing the thread ,with available solution till date. Lets wait for something new in

PI 7.2... for this.

Regards,

Ashutosh

Former Member
0 Kudos

hi,

if you want your directory name dynamically from Payload, you can use the option variable substitustion;

For example follow below procedure:

1)in the Target directory name --> /%dir%

2)go to advanced tab and check for the variable substitution option(enable),

3)variable name:dir

Reference:Payload:mt_filetest,1,name,1

according to the given details in the communication channel your payload should be like this

<?xml version="1.0" encoding="UTF-8"?>

<ns0:mt_filetest xmlns:ns0="urn://filetest">

<name>madhav</name>

</ns0:mt_filetest>

now directory is created with the name of madhav (Dynamically according to the payload directory name is created).

Note: points if it is useful

Thanks

Madhav

Former Member
0 Kudos

Hey

i guess you can use "Advanced selection for source file" option in sender communication channel?

Here the constraint is that you should know all the directories when you configure sender communication channel.

Thanx

Aamir

former_member192079
Participant
0 Kudos

Dear Aamir Suhail

"Advanced selection for source file"

is helpful only for multiple directory ( again path is hard coded )

dear Rodrigo

Are you using NFS or FTP for your testing..?

Regards

Ashutosh R

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi,

boths

Thanks

Rodrigo

former_member192079
Participant
0 Kudos

Thanks Rodrigo

i also tested it with FTP

i got error at CC

" FTPEx: /users/b-sap/test/ar/* : "A file or directory in the path name does not exist.*

inside ar folder TT folder is there, which contain source file

Could you through more light on your result...

Regards

Ashutosh

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi,

could you copy and paste exactly you've defined in CC for directory and file name please

thanks

Rodrigo

former_member192079
Participant
0 Kudos

Dear Rodrigo

i am giving the parameters :

File Directory : /users/b-sap/test/ar/*

File Name : ashu.xml

Dear Madhav

again i am mentioning my requirment is for Sender adapter

variable substitution is for target file creation...

Regards

Ashutosh

Former Member
0 Kudos

Hi ashutosh rawat,

Had you solved your problem?

Kindly share it, I got the same issue/scenario

Thanks,

former_member192079
Participant
0 Kudos

Hi,

Well, we convince the legacy application buisness owner to create files in a Single Directory.

Regards,

Ashutosh R

stefan_grube
Active Contributor
0 Kudos

Sometimes the easiest solution is the best

former_member192295
Active Contributor
0 Kudos

HI,

Below links will help to dynamic file name

former_member192079
Participant
0 Kudos

Hi all

thx Rodrigo Alejand...

/file/* was tried , but did'nt work...

My issue is with Directory , not with file name...

A/B/C are dynamic folder names...created by a 3rd party application.

Dear Prateek & NALLAM GUNA RAN...

I hope this time i have make my point clear

Regards

Ashutosh

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi,

its works for me,

do not put /file/* thats is an example. if your directory A(B((C))) are dynamyc, put /* in the dyrectory and try.

Thanks

Rodrigo

Edited by: Rodrigo Alejandro Pertierra on Aug 12, 2008 10:34 AM

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Hi,

i was looking for a document but i cannot find nothing about your issue with out a Z module.

yes, you can fix it with a module. but why dont you try to reach the file putting an *

E.X:

Dyrectory: /file/*

File Name: Customer.xml

original path: /file/clients/WallMart/Customer.xml

the problem is if you have two file with the same name; in this case PI will get both

try this.

Thanks

Rodrigo

Edited by: Rodrigo Alejandro Pertierra on Aug 12, 2008 9:45 AM