Hi Scott
I'll make an another attempt :)
So only files on server A needs to be monitored. If the file is delivered to subfolder 1, copy to subfolder 1 in in both B and C. If file is delivered to subfolder 2, copy only to subfolder 2 in server C. Is that correct?
If so, there are a few ways to solve it. I will list 3 possibilities here, the last one is potentially the simplest one
1) You can use 2 triggers the way you suggested. The problem is that it's not really a scalable solution. If you want to add another subfolder one day, you will need to add another trigger, and so on.
2) You can have one trigger monitor topfolder and all subfolders. Then you get the folder name of the triggered file. Let's say it is subfolder 1. You then need to look up somewhere ( a table or a file for example) what this folder is mapped to. So subfolder 1 will be mapped to server B and C. subfolder 2 will be mapped to C only. So looking up subfolder 1 would return B and C. You would then loop over this and copy to both servers. You will end up with a bit of looping here, and copying one file at the time, so if we are talking about hundreds of files, it isn't terribly efficient.
3) Ok, this is by far the easiest,
IF the following assumption is correct: It seems to me that you want subfolder 1 on Server A to be in sync with subfolder 1 on Server B and C, and subfolder 2 on Server A should be in sync with subfolder 2 on server C.
If this is correct then you can just create a job that has a sync file task between Server A subfolder 1 and Server B subfolder 1, and so on. You can have it run every minute or so, if you can live with that lag. You don't even need a trigger for this solution. If not, you can have it be triggered by files arriving on Server A. I can expand on that part if you want
thomas
Edited by user
2018-09-14T18:58:50Z
|
Reason: Not specified