on 10-29-2006 9:24 PM
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
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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>
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
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.