cancel
Showing results for 
Search instead for 
Did you mean: 

Need help: Move file using FTP and PI. Write to directory A, then after transfer, move to directory B without change the file name.

former_member252784
Discoverer
0 Kudos

Hi!

I want to send a file, using FTP, to a specific directory on Receiver server, ie /tmp. After the transferring of the file is finished I want to move the file to another directory on the Receiver side, ie /integratethis. I don't want the file name to be changed. Can someone give me some help how to?

In my setup I'm using the File adapter in PI. The setup is a Integration scenario without any mapping. The file is created in SAP, writes the file to directory, then PI receives the file from that directory using File adapter and forward it to the Receiver. This setup is working fine execpt the move to another directory after transfer.

Thanks in advance.

/Erik

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Erik,

Is your concern integrity of the file in that the receiver might pick up the file while you are still ftp'ing it across?

If that is the case, why don't you just use the built-in 'Use Temporary FIle' mechanism of the PI File Adapter?

You could FTP the file directly into the /integratethis directory with a .tmp extension (for example). Once PI completely FTP's the file across it does a filename change (move or rename) to the filename you originally specified.

Regards, Trevor

udo_martens
Active Contributor
0 Kudos

Hi Erik,

you can setup a second process just tranferring the file (with the same name). Michal desribed than in The same filename from a sender to a receiver file adapter - SP14

Regards,

Udo

former_member184681
Active Contributor
0 Kudos

Hi,

Simply use the Processing Mode = Archive, to move the original file to the archive directory. Refer to SAP Help for more details:

http://help.sap.com/saphelp_nwpi71/helpdata/en/44/682bcd7f2a6d12e10000000a1553f6/content.htm

Regards,

Greg

Former Member
0 Kudos

Hi,

use OS command.

Fabio

former_member252784
Discoverer
0 Kudos

Do I need to create a file that PI process after transfer?

And add the path in OS command after process?

ie:

open ftp-ip

user

passw

rename /tmp/* /integratethis/*

quit

Former Member
former_member252784
Discoverer
0 Kudos

Hi,

The PI is running on a I-series. Should the path for command after processing be setup in another way then the tutorial you refered to? Can see that they descibe Windows and UNIX.

/Erik

Former Member
0 Kudos

Hi,

check this link:

http://scn.sap.com/thread/1438670

maybe it can help you.

Fabio