# Scripted Branch connector

**URL:** <https://community.cdata.com/t/scripted-branch-connector/574>\
**Category:** CData Arc\
**Tags:** question\
**Created:** [December 15, 2023, 5:24pm UTC](https://community.cdata.com/t/scripted-branch-connector/574 "2023-12-15T17:24:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericbux](https://sea3.discourse-cdn.com/cdata/user_avatar/community.cdata.com/ericbux/32/1679_2.png) [@ericbux](https://community.cdata.com/u/ericbux)\
**Post date:** [December 15, 2023, 5:24pm UTC](https://community.cdata.com/t/scripted-branch-connector/574/1 "2023-12-15T17:24:53Z")

</div>

I am using the Copy connector to make a copy of all EDI 810 for a trading partner and sending them to another workspace where I need to find a group of 200 possible unique matches and route them to another trading partner.&nbsp; As you can see in the screen shot below, I know what file name(s) to look for and therefore began this new flow using the Branch connector.

The values I’m looking for in the filename will always match a specific pattern.&nbsp; However, the branch connector is going to be MASSIVE if I manually add 200 possible filename patterns. (this image shows only 6)

 ![7b865425-ca4d-4455-809a-f587e34cbaa0.png](https://us1.discourse-cdn.com/cdata/original/2X/4/45c4f669c88f924ce11754feb68d54f710fe2c11.png)

Besides being tedious, this method will work but I am wondering is there a way to script this?&nbsp; Regardless, I will still be hard-coding 200 filename prefixes.

Thanks

---

<div class="post-metadata">

**Author:** ![ericbux](https://sea3.discourse-cdn.com/cdata/user_avatar/community.cdata.com/ericbux/32/1679_2.png) [@ericbux](https://community.cdata.com/u/ericbux)\
**Post date:** [December 18, 2023, 4:31pm UTC](https://community.cdata.com/t/scripted-branch-connector/574/2 "2023-12-18T16:31:11Z")

</div>

I think I came up with a better solution.&nbsp; I am going to add a new value to my result set which is a 0 or 1.&nbsp; If a 1 is present at the end of my filename \*\_1.810 then route it to the other trading partner.
