cancel
Showing results for 
Search instead for 
Did you mean: 

FTP - Run OS Command before file processing

Former Member
0 Kudos

Hi,

I have a requirement wherein I need to FTP a file from XI to a folder in a FTP server . Now FTP Server is set up in such a way that I cannot put the file directly. Before transferring the file , I have to use CD ( change directory command ) to access a particular folder and then transfer the file. This means that I cannot give the folder information directly to TARGET DIRECTORY.

To address this, I decided to use the feature "Run OS Command BEFORE file processing " . And wrote a command 'cd <foldername> .It is not working. Then I tried using "Run OS Command AFTER file processing " and it also didnot work.

Does anyone have any clue how can I address this requirement using FILE Adapter.

thanks,

rakesh

Accepted Solutions (1)

Accepted Solutions (1)

moorthy
Active Contributor
0 Kudos

HI,

OS commands will be executed in XI server not in the FTP server. So first you need to connect into FTP server and then you need execute CD command.

option 1) Get the absolute path ie direct path from FTP server so that you can directly connect to FTP server's specific directoty

22) In this case , write the file into your XI server itself by NFS File Transport protocol. Then ftp this file from your XI server into FTP server using Shell Script.

So write a shell script which will be executed in the XI server, inside this write a logic of tranfer of files with FTP protocol. This shell script is executed from the Reciever File adapter with the option OS command.

Hope this helps,

Regards,

Moorthy

Answers (1)

Answers (1)

Former Member
0 Kudos

Friends.....Any Ideas???

former_member206604
Active Contributor
0 Kudos

Hi,

First try creating a folder using MD or mkdir command and see if it is working fine.

Also refer this blog by Michal and this might be useful.

/people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching

Thanks

Prakash