cancel
Showing results for 
Search instead for 
Did you mean: 

file copy

Former Member
0 Kudos

hi,

I need to get the filename from my payload and then I need to transfer that file from one location to another... how to do that... any help

thank you

Accepted Solutions (0)

Answers (1)

Answers (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

if you want to copy file try this weblog:

/people/shabarish.vijayakumar/blog/2006/04/03/xi-in-the-role-of-a-ftp

if you want to copy the file and set it's name

you can use a mapping and set a name

via dynamic adapter paramaters

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Former Member
0 Kudos

hi Michal,

Thanks for the reply. But my scenario is like:

I am getting data from a webservice like this:

<Input parameters>

<ordername>xxxx</ordername>

<id>123</id>

<filename1>c://pic/file1</filename1>

<filename2>c://pic/file2</filename2>

<filename3>c://pic/file3</filename3>

</Input parameters>

i need to copy the complete file path and transfer those files from that location to another location.

I have no clue how to do this.

Any help is appreciated.

thank you

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

if you want to fetch a file

you need to do it via proxy (java proxy)

in which you will just copy the file using

the path - no standard way to do it

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Former Member
0 Kudos

can u point me to some blogs or documents , how to do that...

much appreciated.

thank you

former_member206604
Active Contributor
0 Kudos

Hi,

Try as Michal said and also there is another way using OS commands.

You need to create a mapping as below\

Target

-Row

--Line

The values in the line should be

COPY <the path form the sourcefild> targetlocation

<the path from the sourcefiled> is the filename1 field from youe source strucutre

targetlocation is where you need to save the file.

Now by using content conversion you need to save a file with the extension .bat for windows and .sh for shell.

Lets take you are saving output.bat and your output will look like this

COPY
host\path\file1
host\target

COPY
host\path\file2
host\target

In the communication channel you can give the name the above file with a clear path in the field Run OS command after message processing.

The above will work for NFS for FTP you need to change the commands accodingly.

Regards,

Prakash