cancel
Showing results for 
Search instead for 
Did you mean: 

File adapter Receiver

Former Member
0 Kudos

Hello,

I wanted to know how to archive file after ftp the file. I am using Receiver Fileadapter. I tried to use following command in the "<u><b>Run Operating System Command after Message Processing</b></u>"

copy %f c:\archive

This did not copy the file after ftp.

I appreciate your help.

Thank you,

Balaji

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

>>copy %f c:\archive

yes,it will not work coz you can't run shell comand like this.you need to write a script and then give the path of that script in "Run Operating System Command after Message Processing"

Reference:SAP Note 841704

Thanx

Aamir

Former Member
0 Kudos

Aamir,

Thank you for the response. I created archive.bat file on XI with following line in the bat file.

copy %f c:\archive

I specified archive.bat file name in the "<u><b>RunOperating System Command after message pocessing</b></u>" with complete path as follows.

C:\archive.bat

However the file is not archived. I am not sure what is worng wih it.

Thank you,

Balaji

Former Member
0 Kudos

what does the log says in communication channel monitor?

it will tell u whether the OS cmd was executed or there was any error?

Thanx

Aamir

Former Member
0 Kudos

Hi balaji,

If your XI is on Unix system then I think your command "c:/" will not work, you need to provide Unix path for same...not sure..but u can check.

Hope this will help.

Nilesh

Answers (2)

Answers (2)

Former Member
0 Kudos

hi Balaji,

Remember we cannot any OS leve command on FTP Server, you can call only on XI server.

So what you have to do is basically create an batch file (having coding for connecting to FTP server and copying file on ftp server, you can use java code also here and call from batch file) and call this batch file from XI adapter.

Try it.

Ranjeet Singh.

Former Member
0 Kudos

Have you tried using the Archive setting?

Processing Mode

&#9675; Archive

Files that have been successfully processed are moved to an archive directory.

&#9632; To add a time stamp to a file name, select the Add Time Stamp indicator.

The time stamp has the format yyyMMdd-hhMMss-SSS_. The time stamp ensures that the archived files are not overwritten and it enables you to sort them according to the time that they were received.

&#9632; Under Archive Directory, enter the name of the archive directory.

&#9632; If you want to archive the files on the FTP server, set the Archive Files on FTP Server indicator. If you do not set the indicator, the files are archived in the Adapter Engine file system.

http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm