cancel
Showing results for 
Search instead for 
Did you mean: 

Can we make multiple copies and put into different folders?

Former Member
0 Kudos

Hi,

I've got a new task, where I've to pull a file from a folder and put the same file into three different folders. There is no mapping involved in this. Just pull and put into 3 different folders.

  I've worked earlier to pull files from a folder and put into anotherfolder without any mapping involved. But here I need to put into 3 different folders. Please let know now whether it is possible?

Thanks,

Raj

Accepted Solutions (1)

Accepted Solutions (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

This is possible. Use one file adapter for  writing on one directory and "choose the Operating system command after processing" where you can refer script (write command here to copy the files to the desired folders).

Former Member
0 Kudos

Hi Satish and Baskar, Thanks for your reply. This is what i suggested to the client but slightly different. I'm going to have my script in the crontab and run it every 5 minutes. This is UNIX machine.
I'll run the script from the crontab at unix level and to the same for every 5 minutes.

Hi Gangandeep,
Thanks for your reply. Has I've limited time not sure i'm not in possition to explore. But I'll certainly your model seperately.

Former Member
0 Kudos

Hi Raj,

While scheduling it through the cron is a workable solution it's not really ideal from a monitoring perspective. I suppose you could trigger e-mail alerts if something goes wrong in the script but I've seen cases where the cron itself has stopped, in that case we had to write another script that was triggered from another server to first check if the cron daemon was up an running.

Gagan's suggestion would probably take about 5 minutes to do and you would have monitoring and alerting capabilities.

Regards, Trevor

Former Member
0 Kudos

Hi Trevor,

As I mentioned, I  already  have a scenerio where I pick files from one server and send to another server without any mapping involved in that. So as suggested, in the existing scenerio itself, in the Receiver Determination, I tried the 1=1 in the condition section but i see error as below :

Problem evaluating a condition: An exception occurred
Error when determining the receiver: Problem evaluating a condition:

Thanks

Raj.

Former Member
0 Kudos

Hi Raj,

You would ignore the condition in this case, it's irrelevant.

You already have a receiver business system defined? If you do (lets call is BS_1) you can use that for folder 1, you could then add 2 (dummy) business components (or business systems if you like) <lets call them BS_2 & BS_3> for folder 2 and folder 3.

You will then have one receiver determination with 3 legs for BS_1, BS_2 & BS_3 as receivers without any conditions. Then create 3 corresponding receiver agreements and 3 receiver channels (for folder 1, folder 2 & folder 3).

Regards, Trevor

Answers (2)

Answers (2)

gagandeep_batra
Active Contributor
0 Kudos

HiRaj ,

You have create 2 more CC that point to different folder. and 2 more RA,

and add condition in Reciver detemination as "1=1" which always true for all three CC...

Regards

Gagan

Former Member
0 Kudos

Hi Raj,

I think it is not possible to place file into 3 folders at receiver side.

First you need to place file into one directory.  After placing the file you need to run script at OS level to copy that file to remaining 2 directories.

Thanks,

Satish.