cancel
Showing results for 
Search instead for 
Did you mean: 

Adapter module for file renaming

Former Member
0 Kudos

Hi all,

I want to rename a file before writing into target directory. Is it possible to do this using adapter module? Im using File adapter at the sender and receiver.

I tried renaming the file using DynamicConfiguration method.I want some custom constants to be added to the file name. I want to know if file renaming is possible by writing an Adapter module ..

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Please check the code in the hread:

You can do the same in the mapping.

Regards

Vijaya

Former Member
0 Kudos

Hi Vijaya

Thanks for the link.

But in my scenario I am not doing any message mappings..Im using XI like FTP. So the message maping is not there. So I was wondering how can I achieve the User Defined Function to rename the file. So as I cant use any mappings, I need to do it in Adapter Module (I think)

Former Member

Answers (1)

Answers (1)

Former Member
0 Kudos

Rahul~

Writing a module would be too much effort deploying and using..Instead u can use a dummy mapping to target and use a piece of Java code for transformation..

chk my blog will save u effort..XSL may not be required in ur case

/people/sriram.vasudevan3/blog/2005/11/21/effective-xsl-for-multimapping-getting-source-filenames-in-legacy-legacy-scenarios

Former Member
0 Kudos

Hi Sriram,

Please can you elaborate on that. Actually I am not doing any message mapping. I dont need any mappings ( no source or target structure is known) Just I have to pass the file. But I have to rename it before putting in the target dir.

So where shall I use this code? You said something about dummy mapping. Can it be used when no source or target structure is known?

former_member185881
Active Participant
0 Kudos

Hi Rahul

I am also working on similar kind of thing, So can you please help me out in my problem?

My problem is --- I want to change the file name, and the file is at FTP location. for this i am writing a module.

Regards

Dheeraj Kumar

former_member185881
Active Participant
0 Kudos

Hi Rahul

I am also working on similar kind of thing, So can you please help me out in my problem?

My problem is --- I want to change the file name, and the file is at FTP location. for this i am writing a module.

Regards

Dheeraj Kumar