cancel
Showing results for 
Search instead for 
Did you mean: 

Move Existing file in an other ftp folder

Former Member
0 Kudos

Hi to all,

I have an IDoc -> XI -> XML scenario. I put all produced XMl files in a FTP folder. I use "Use Temporary File" as Write Mode in my Receiver channel. But, if the File Adapter tries to write an xml file in the folder that is already present, I don't want to overwrite the existing file, but I want to move the new file that I'm trying to write in a specific ftp folder instead to overwrite the existing file.

Can XI do this?

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

You can select option , Do Not OverWrite Files.

In this case, the message will be in Waiting State in Message Monitoring and once the original file is moved, the new file is written .

You can also resend the message from message monitoring .

Regards

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

I want that the file that I'm tring to write is automatically moved in an other folder B if this file already exists in the folder A. I don't want to move manually the files!

Thanks!

bhavesh_kantilal
Active Contributor
0 Kudos

Gabriele,

You need not resend the files manually.

Normally, the file adapter will try 3 times at an interval of 5 minutes. This interval can be increased and thereby once the file has been picked by the corresponding application, the file adapter will create the new file etc.

Regards

Bhavesh

Answers (1)

Answers (1)

former_member184543
Active Participant
0 Kudos

Hi Gabriel,

Would it be ok if for everyfile a new folder is created?? if its ok, then you can use adapter specific message attributes to dynamically name your destination folder. i.e:- Everytime this scenario runs, your output file will be created in a new folder with any new names you want to suggest.. Refer this link for more details,.

https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/l...

Thanks

Anju<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70c89607-e4d9-2910-7280-f6746e964516">Adapter Specific Attributes</a>

Former Member
0 Kudos

Hi AnjU,

thank you, but I don't need to create a new folder for each file to be written on ftp; I need to write the file in an other folder if in my current folder, a file already exists with the same name.

Thanks!

Former Member
0 Kudos

Hi Gabriele

A receiver adapter module should solve your problem.

You can do all the processing you want in the java code of the adapter module (like checking for the file if it exists). I have implemented a similar adapter module

regards

krishna

Former Member
0 Kudos

HI Krishnamoorthy,

can you give me more details and links on how to create a custom java adapter module and to deploy it on xi?

Thanks!