Search code examples
biztalkbiztalk-orchestrations

Count the number of files in folder in a BizTalk Orchestration


How to get the number of files in a folder inside orchestration in BizTalk?

I want the number of files present in a folder inside orchestration.

Is that possible in BizTalk?


Solution

  • You can write your custom helper to call System.IO.File methods and count files, in Class Library project and reference it from orchestrations project.

    But this approach has number of problems and don't recommend following this path (you'll need to handle possible exceptions, you have transactions and compensation block problems)

    Could you explain why would you need this? It sounds like a general design problem.