Checking the file size before processing

Is it possible in biztalk to check the size of a file from the  via FILE adapter or FTP adapter and then process the file.

For example: If file size exceeds certain limit (say 500KB) then Biztlak should not process the file and raise an error log

January 8th, 2014 3:02pm

In FTP adapter we have properties

1. Maximum File size

2. Before Get- where we can specify the FTP command to check for the file size

refer : http://msdn.microsoft.com/en-us/library/aa561710.aspx

Free Windows Admin Tool Kit Click here and download it now
January 8th, 2014 3:42pm

What you asking for specifically is not provided for directly in any out of the box component.

It is definitely possible to implement this pattern by using a custom pipeline component that queried for the file size then takes some action, such as replacing the file message with an error message and moving the large file to an alternate location.

This is relatively easy with the File Adapter since you can perform all the File operations with System.IO.

It could tricky with FTP due to inconsistencies in how directories and properties are listed but doable as well with an FTP library.  There are several out there.

January 8th, 2014 4:22pm

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

Other recent topics Other recent topics