Search code examples
fileftpbiztalkbiztalk-2010

Ftp Receive Location Minimum size Control


I have a BizTalk FTP receive location. And sometimes facing a problem of zero byte sized file. When we said our partners you send us empty files, they don't accept this. And as a solution a want to add a filter to our FTP receive location to check whether file size greater than zero. I want to get files if size of file greater than zero.


Solution

  • One way you could solve this is to create a custom pipeline component.

    This component would check the length of the stream. In case the stream is empty (length 0) or whatever you would consider to expect if you receive an empty file, you could return null for the message.

    That way, your message will be dropped in your component (within your pipeline) without having any impact in case a non-empty file is received and processed.