File Mask Issue

Hi All,

I have one Receive Location which Pick the file type of *.xml but i have issue as in that folder few files come with the extension ".xml[any other symbol]" and biztalk Receive Location also picked this type of file.

I want to restrict the files which has extension ".xml[any other symbol]" and only those file which has exact extension ".xml" should be picked.

In windows if we search with *.xml than it will pick all file starting with extension XML but if we search with "*.xml" (added double quotes) than it will fetch only those files whose extesion is XML only.

Same thing i had try to add in File Mask of Received Location but it will not allow double quotes.

Please help me.

Thanks in advance.

September 24th, 2013 2:55am

Hi,

You can make like filename .xml. which type of files you want receieve then filenamemask, then that only files will be received.

Thanks

Free Windows Admin Tool Kit Click here and download it now
September 24th, 2013 3:00am

What you;re seeing a known behavior of the File Adapter.

Refer http://msdn.microsoft.com/en-US/library/ee253281(v=bts.10).aspx where the following is quoted:

The File adapter only takes the first three characters in a file mask extension into consideration when matching up files in receive locations with a mask. For example, if a file mask is "*.xml", files with the extension ".xml[any other symbol]" will be picked up. In addition, if a file mask is "*.xmln", files with the extension ".xml[any other symbol]" will be picked up.

Instead of dropping files with xml[any other symbol] get them to drop files as .[any other symbol]xml and the file mask would work. Somewhere along the line if the file is renamed appropriately then it'd get picked up and processed.

Regards.

September 24th, 2013 3:41am

It is a restriction of receive File Adapter

You can workaround it by creating custom receive pipleine and check and validate value of ReceivedFileName

I hope this will help you 

 

 

Free Windows Admin Tool Kit Click here and download it now
September 24th, 2013 3:50am

If BizTalk is only to PICK the files named "*.xml", then a Pipeline Component is not a solution, unless the Component actually wrote back the file!!

If this really is a strong requirement, and you cannot have the publisher of the files change the naming convention, you would need to build a new File Adapter (or File WCF binding, using the WCF-Custom Receive Adapter.


Morten la Cour

September 24th, 2013 3:58am

You can let your custom receive pipeline to write in different receive location(which is the filtered of xml files) then configure your receive location to read from filtered location path.


Free Windows Admin Tool Kit Click here and download it now
September 24th, 2013 4:12am

Hi All,

Thanks for your quick responce.

We can not change the file extension sequence.

I will try for the custom receive adapter and let you know.

There is no other way to filter exact XML file from Receive location without doing customization?

Thanks in advance.

Thanks,

Kushal Patel

September 24th, 2013 5:59am

A simple out of the box solution would be to have the source write to a different location and create a Windows Scheduled Task to copy only *.xml files to your Receive Location folder.

Free Windows Admin Tool Kit Click here and download it now
September 24th, 2013 9:05am

You can let your custom receive pipeline to write in different receive location(which is the filtered of xml files) then configure your receive location to read from filtered location path.


September 24th, 2013 10:57am

You can let your custom receive pipeline to write in different receive location(which is the filtered of xml files) then configure your receive location to read from filtered location path.


Free Windows Admin Tool Kit Click here and download it now
September 24th, 2013 10:57am

A simple out of the box solution would be to have the source write to a different location and create a Windows Scheduled Task to copy only *.xml files to your Receive Location folder.

  • Marked as answer by Kushal1087 3 hours 49 minutes ago
September 24th, 2013 3:58pm

A simple out of the box solution would be to have the source write to a different location and create a Windows Scheduled Task to copy only *.xml files to your Receive Location folder.

  • Marked as answer by Kushal1087 Thursday, September 26, 2013 6:37 AM
Free Windows Admin Tool Kit Click here and download it now
September 24th, 2013 3:58pm

Thanks for your suggestion and i think this is really good and quick fix.

Thanks,

Kushal Patel

September 26th, 2013 2:47am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics