# Filename selector in new Branch connector fails

**URL:** <https://community.cdata.com/t/filename-selector-in-new-branch-connector-fails/359>\
**Category:** CData Arc\
**Tags:** question, arc, cdata-arc\
**Created:** [August 28, 2023, 8:31am UTC](https://community.cdata.com/t/filename-selector-in-new-branch-connector-fails/359 "2023-08-28T08:31:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![RichardG](https://sea3.discourse-cdn.com/cdata/user_avatar/community.cdata.com/richardg/32/459_2.png) [@RichardG](https://community.cdata.com/u/RichardG)\
**Post date:** [August 28, 2023, 8:31am UTC](https://community.cdata.com/t/filename-selector-in-new-branch-connector-fails/359/1 "2023-08-28T08:31:40Z")

</div>

I started using the new Branch connector with an existing AS2 connector. The Branch connector will be used to save specific messages based on the Filename to a different folder.

I’ve setup the Branch connector as shown in the image provided in the Help for the Branch connector.  
IF&nbsp; **Filename** &nbsp;_matches glob_&nbsp;CUS\*.\*

But instead of the output being send to the provided File Connector to save the message in a different folder, the message is forwarded to the ELSE clause and forwarded to that&nbsp;attached connector.

The log-file shows the following information (not really helpful at the moment):

`[2023-08-25T15:36:47.403] [Info] CUSDEC325-0000000000062014 is routed to File_SHPP2MEP_Test (which is the ELSE clause). [2023-08-25T15:36:47.403] [Info] Message CustomerAS2_TEST-20230825-153646575-eCIr is finalized. Name: CUSDEC325-0000000000062014, Type: Output, Status: Success, Message: , Processing Time: 16ms. [2023-08-25T15:36:47.403] [Info] Arc Version: 23.2.8606.0 [2023-08-25T15:36:47.403] [Info] System Version: Microsoft Windows Server 2022 Standard [2023-08-25T15:36:47.403] [Info] VM Version: 4.0.30319.42000 [2023-08-25T15:36:47.403] [Info] Message CustomerAS2_TEST-20230825-153646575-eCIr is finalized. Name: CUSDEC325-0000000000062014, Type: Input, Status: Success, Message: , Processing Time: 16ms.`

Some additional info in the files/messages that we receive:

The message format is EDIFACT, so I have to use the Filename selector.  
The message has no file extension.

---

<div class="post-metadata">

**Author:** ![Ankit\_Singh](https://sea3.discourse-cdn.com/cdata/user_avatar/community.cdata.com/ankit_singh/32/1614_2.png) [@Ankit\_Singh](https://community.cdata.com/u/Ankit_Singh)\
**Post date:** [August 28, 2023, 8:35am UTC](https://community.cdata.com/t/filename-selector-in-new-branch-connector-fails/359/2 "2023-08-28T08:35:03Z")

</div>

Hey&nbsp; @RichardG

The New Branch connector should allow you to add multiple Branch logic with a single Branch connector. It looks like the challenge you are facing has more to do with configuration. Can you please share a screenshot of your workflow that explains the current logic you have created?

---

<div class="post-metadata">

**Author:** ![RichardG](https://sea3.discourse-cdn.com/cdata/user_avatar/community.cdata.com/richardg/32/459_2.png) [@RichardG](https://community.cdata.com/u/RichardG)\
**Post date:** [August 28, 2023, 9:28am UTC](https://community.cdata.com/t/filename-selector-in-new-branch-connector-fails/359/3 "2023-08-28T09:28:22Z")

</div>

Hey @Ankit_Singh ,

This is the workflow:

 ![d1444d91-461a-4903-9ed0-ade060a1d42c.png](https://us1.discourse-cdn.com/cdata/original/2X/2/265c47a922d742df8dba91f5d1af1549f9688120.png)  
Workflow

And these are the settings for the Branch connector:

 ![488b74d1-01b1-4202-b3f8-6be4f37b512c.png](https://us1.discourse-cdn.com/cdata/original/2X/d/d4c7f012abc4aa2e0901599048bd3d1c99e5f73a.png)  
Branch Connector Settings

And this is the Input(/output) page, where you can see the processed files:

 ![0ba2f4c4-c63a-4456-8be7-7531d4fe5a8e.png](https://us1.discourse-cdn.com/cdata/original/1X/40b2c37d77e0a0a9aead285d1ca0dd8aef143d94.png)  
Input tab

The files that start with CUSDEC325 should have been sent to the File\_SHPP2ES\_Test connector.

---

<div class="post-metadata">

**Author:** ![RichardG](https://sea3.discourse-cdn.com/cdata/user_avatar/community.cdata.com/richardg/32/459_2.png) [@RichardG](https://community.cdata.com/u/RichardG)\
**Post date:** [August 28, 2023, 9:32am UTC](https://community.cdata.com/t/filename-selector-in-new-branch-connector-fails/359/4 "2023-08-28T09:32:50Z")

</div>

PS.  
I noticed&nbsp;this morning that another connection has the same issue.

In that case we check for the extension of the file. I’ve recently replaced the now discarded FileMatch connector with the new Branch connector, but all files are sent via the Else clause, instead of the case selector.

For that Branch connector i’ve used the same IF filename matches glob setting.

---

<div class="post-metadata">

**Author:** ![Ankit\_Singh](https://sea3.discourse-cdn.com/cdata/user_avatar/community.cdata.com/ankit_singh/32/1614_2.png) [@Ankit\_Singh](https://community.cdata.com/u/Ankit_Singh)\
**Post date:** [August 28, 2023, 9:52am UTC](https://community.cdata.com/t/filename-selector-in-new-branch-connector-fails/359/5 "2023-08-28T09:52:55Z")

</div>

Hi @RichardG

Can you replace the filter condition with **‘CUS\*’** &nbsp;?

I believe setting it to **‘CUS\*.\*’** &nbsp;is expecting the Branch connector to look for a **‘.’** in the filename which includes extensions.  
So ideally, the Branch connector will only pass a file named CUSXXXX.XXX which is NOT&nbsp;matching the input files you are expecting it to pass.

---

<div class="post-metadata">

**Author:** ![RichardG](https://sea3.discourse-cdn.com/cdata/user_avatar/community.cdata.com/richardg/32/459_2.png) [@RichardG](https://community.cdata.com/u/RichardG)\
**Post date:** [August 28, 2023, 1:45pm UTC](https://community.cdata.com/t/filename-selector-in-new-branch-connector-fails/359/6 "2023-08-28T13:45:15Z")

</div>

@Ankit_Singh

That was the solution for the&nbsp;issue with this connector. By removing the ".\*” the files without a file extension are checked as well.

Thank you very much
