I would like to only get files ending with *.xls OR *.xlsx extension from my Receive Location. How should "File mask" look like?
3 Answers
I have not personally tested that BizTalk only uses the first 3. charaters, but if so, this is probably a dangerous solution, since it might be addressed in future hotfixes.
I would suggest creating two receive locations, one for each filter, and bind them to the same receive port. This is also more future-proof since you can add any number of folders or file types. And that is basically the design idea behind ReceivePorts and -locations.
If you are using orchestrations, these are bound to the Receive Port anyway and you do not need to make any changes for this to work. If this is a messaging only scenario, you just need to make sure that your subscriptions/filters are not based on the name of the receive location and you are fine.

- 66
- 1
-
Thanks. I just changed that to your suggestion and it works nicely. Also it is much cleaner now. Thank you. – Hooch Dec 12 '14 at 11:34
File adapter uses three chars only for extension, so even if you give *.xlsx it will pick both *.xls and *.xlsx file. You don't need to do anything in yr case just use *.xlsx for file mask

- 1,455
- 8
- 10
This is not possible with a single Receive Location:
Only one file mask or file name can be specified per receive location or send port.
See MSDN: Restrictions on the File Mask and File Name Properties
However, you can use the File Adapter SDK Sample and build your own Adapter to use a regular expression as described in this blogpost.

- 673
- 3
- 8