cancel
Showing results for 
Search instead for 
Did you mean: 

How to collect .xml messages from 3 folders to one folder with/without BPM?

Former Member
0 Kudos

Hi All.

I need to take all the incoming files from the one folder. I have 3 incoming folders now and this number would be more in the future. What is a most simple way to collect all the files in one folder? By the way, ALL folders would be created in one UNIX parent folder.

Thanks in advance for your answers!

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hey

>>I have 3 incoming folders now

and you will have your files in these folder,right?

see with sender file adapter you can pick up all the files in a certain folder by using . as the sender file name in communication channel,but as you have different folders(not different files) under one parent folder,you might not be able to pick up the files by just one sender adapter,you need to configure different sender adapter for all different folders.

lemme know if i understood your problem right.

Thanx

Aamir suhail

Former Member
0 Kudos

I don't want to create CChannel every time for each new folder. My goal is to automate this process.

parent_folder -

-F1

-F2

-F3

-Fnnn

Former Member
0 Kudos

Hey

its not possible to pick up files from different folders by using only one sender communication channel.

you might wanna create a Unix shell script which will copy all the files into one folder and then you can use . to pick up all these files.

make sure all the files have same message structure else you will get errors in mapping

Thanx

Aamir suhail

Former Member
0 Kudos

this blog shows how different files can be picked up from a folder

/people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter

y don't u try using this by specifing 2 folders and c if ti works since both the folders are under the same parent dir

directory filename

-


parent/f1 .

parent/f2 .

Former Member
0 Kudos

Golynkin,

Read the source files from different directories using Advanced Selection for Source File option in file sender communicaiton channel. Check this weblog for some reference on this:

/people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter

In this he has mentioned how to exclude the files in particular directories. You dont need to do that. Just read all the files in that directory.

Also if the interface is only to move then using this weblog you move the files to one folder:

/people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository

Regards,

---Satish

Former Member
0 Kudos

first link explains how to process files from the same folder to different interfaces... My files should be processed through one interface...

second link explains how to process non xml file. My files are xmls...

Thanks anyway

former_member192892
Active Contributor
0 Kudos

Hey,

I was watchin this thread out of my curiosity 2 know how it'll work...

I think the 1st blog shud work fine

Former Member
0 Kudos

Hey Varun

please look at the assumption he made in the beginning itself

<i>all sender files must be in the same folder</i>

in the our case there are several folders and in those folders he has the files,the method wont work for him

best option as far as i know of is to write a shell script and collect the files in one folder first of all and then use one sender CC

Thanx

Aamir suhail

former_member192892
Active Contributor
0 Kudos

Ya Aamir, but i was thinking what if we give different directories in the advanced selection text boxes...

Former Member
0 Kudos

Hey

sure we can give that,but his case is not just limited to few directories,like he said in future he will be getting files from different folders and the number of folders will increase ,so do you think its advisable to keep changing the configuration of sender file adapter in Prd everytime he gets to pick the files from some new folder:)

Thanx

Aamir suhail

Former Member
0 Kudos

Dmytro,

Just one more thought.... I am not sure weather this will work or not..

If you could write a java module where you can read folder files from all subfolder as well...you can call this module in file adapter before calling localejbs/CallSapAdapter..

Just a thoght...

Nilesh

Former Member
0 Kudos

good idea. do you have the source code?

Former Member
0 Kudos

No...I never had this kind of problem....But if you able to do it successfully then can you please share solution with us as well...it would be good learning experience for us as well

Nilesh

henrique_pinto
Active Contributor
0 Kudos

You cannot enter mask for Directory in the standard File Adapter.

Either you develop your custom adapter (custom module wouldn't have a good design, in my opinion) or use <i>Advanced Selection for Source File</i>, to give more than 1 source directory in the same sender adapter. As I've understood, he may have more folders added but it is not a "daily based" change. He'd have to change it only once in a while.

Regards,

Henrique.

Former Member
0 Kudos

Dmytro,

Are you talking about reading all files from incoming folder?

You can set file name as . in sender file adapter.It will pickup all files from incoming folder.

If not can you please give more details.

Nilesh

Former Member
0 Kudos

I'm talking about coping all the files from several UNIX folders to one UNIX folder. It would be more folders in the future, but all the folders would be created in one parent folder. My goal is to copy all the files from all the folders to one folder automatically.

For now I have 3 folders from those I want to take files and I need to copy all files to another folder.