cancel
Showing results for 
Search instead for 
Did you mean: 

FTP ReceiverChannel and OS commands help

Former Member
0 Kudos

Hi,

I'm trying to execute an Operating System Command after processing.

I want to move *.dat files from the "ccc" Folder to the temp folder on the FTP server.

The command line looks like this "move \ccc\*.dat \temp"

Can any one help.

Live long and prosper

Frank Hinrichsen

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Frank,

check this blog on how to use and debug OS commands in File Adapter from Xi,

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

Regards,

Bhavesh

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello

You can execute commands on the XI OS only. To execute OS command on FTP server using :

ftp <parameters>

Refer any standard FTP guide for syntax

Regards

Former Member
0 Kudos

Hi,

I trying with the command "ftp rename f% /newfolder/f%"

This should be the syntax when moving files with FTP commands.

The command should be execute as a "After Message Processing" Command Line in my Receiver FTP adapter.

I'm not sure if I have to login on the FTP server again.

;-( Frank

bhavesh_kantilal
Active Contributor
0 Kudos

Frank,

What conect mode have you used?

<b>Permanently</b>

An existing connection to the FTP server is used permanently.

The connection is reestablished automatically if it is closed by the server.

<b>Per File Transfer</b>

A new connection to the FTP server is established for each file transfer.

Regards,

Bhavesh

Former Member
0 Kudos

Sorry.. I'm using Permanently connection

bhavesh_kantilal
Active Contributor
0 Kudos

Frank,

Am not sure I understand your requirement completely. Can you elaborate on the problem you are facing.

Regards,

Bhavesh

Former Member
0 Kudos

Hello

Please note that :

1. Either you have to provide the connection parameters in OS command itself like host etc , or

2. You may try using permanent connection

Regards

Former Member
0 Kudos

I have an Receiver FTP adapter.

After Message Processing,I would like to move the file on the FTP server.

Under "Run Operating System Command After Message Processing" in the command line I write

<b>"ftp rename /Folder/filename.xml /newFolder/filename.xml"</b>

I think this is the right syntax.

I'm using permanently connection. so there should be no login issues.

But the rename on the FTP server is not done. The User is autorized to execute the rename command.

I have succesfully used the above command in DOS prompt.

Hope this makes my problem clear to you .

Regards Frank

Former Member
0 Kudos

Hi

Please try following :

ftp rename f% /newfolder/f% , where %f is required and not f%

Regards

Former Member
0 Kudos

There is no archive option on a FTP receiver channel !!!! I will try option 1