cancel
Showing results for 
Search instead for 
Did you mean: 

File name change with FTP backup

Former Member
0 Kudos

Hi everyone,

I would like to know if there is any chance to change the filename when the FTP adaptor is doing a backup. There is a sender communication channel that makes a backup, the thing is that I would like to change the backup file name at the beginning, for example introducing a letter, in this way:

ORIGINAL FILE: FILE.txt

BACKUP FILE: AFILE.txt

I would not like to add extra configuration for this, is it possible to do it in a simple way?

Thanks a lot

Edited by: Figlueira Fort on Feb 18, 2011 3:04 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can do it calling a os command in your communcation channel and executing a remote script to copy original file to backupfile. After that, processing mode could be detele .

Regards,

Carme

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

I am trying to use some Unix Commands in order to change the file name, but it does not work.

I am taking a file with a sender communication channel and processing it via Archive. Then I use the Run Operating System Command Before or after Message Processing, like this (&f represents the corresponding name of file, and A is a letter to introduce, it must be at the beginning of the file):

&mv &f A&f

I have also tried with command &cp

When I execute this, the file does the backup, but does not change the file name, and I only get a warning in the runtime workbench. I am not able to see anything else.

What can I do?

Thanks a lot

deepak_shah
Contributor
0 Kudos

Hi,

please refer this blog for catching any error.

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

In Addition you can refer this blog link /people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions

regards,

Deepak

Edited by: Deepak Shah on Feb 22, 2011 10:25 AM

Former Member
0 Kudos
Former Member
0 Kudos

You have can handle this through OS command (after processing)in sender communication channel.

Thanks,

Former Member
0 Kudos

Thanks for the answers.

Hareenkumar, do you know how can I do this? which command do I need to use and how?

I am not able to find any useful information on the internet, any help is much appreciated.

Thanks in advance.