cancel
Showing results for 
Search instead for 
Did you mean: 

How to move a file on the receiver system using the file/FTP adapter..??

Former Member
0 Kudos

Hi all

I need to place a XML file into a specific folder on the receiver system using the file/FTP adapter (SP13). Our customer want this to be done in 2 steps. Step 1: Receive the XML file in the root directory. Step 2: Move the XML file to a specific folder named 'toldskat'. I'm able to do step 1 by specifing '/' in Target Directory. My question is how do I proceed with steep 2..??

Thanks - Peter

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Peter,

<u>You can do it using OS command only if you are using NFS protocol.</u> The command you'll have to use is if the initial directory where you output the file is like

/usr/sap/tmp and you would like to move it to /usr/sap/out

<b>mv %F /usr/sap/out.</b>

This %F will take the full file name and path which you mentioned in the target directory and file name will be held by the file adapter.

Cheers

JK

PS: Award points if this helps you

Answers (3)

Answers (3)

Former Member
0 Kudos

I think JK's suggestion might work in the Windows world using the 'move' command. Look up the move help by typing in 'move /?' in the command prompt. I think the os command might look like this

move /Y filename.txt c:\toldskat

Former Member
0 Kudos

Hi JK and Bhavesh - thank's for your answer.

We are using the FTP Transport Protocol so I guess it's not possible to use the suggestion JK mentioned..?? I'll go through the web blog now mentioned by Bhavesh - Thanxx..:-))

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Peter,

I dont think this is possible using one single file adapter.

One solution to your problem would be to create a <b>file to file</b> scenario where the file is picked up from the source folder ( root folder ) and passed to the corresponding folder ( toldska ) where you want it to be sent.

Just Check these web blogs by Venkat for the file to file scenario,

/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1

/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2

Hope this helps,

Regards,

Bhavesh