Retrieving Partial File name from the Full file path in an Orchestration

Home Page Forums BizTalk 2004 – BizTalk 2010 Retrieving Partial File name from the Full file path in an Orchestration

Viewing 1 reply thread
  • Author
    Posts
    • #25788

      I need to update a table in Sql server where the file name in the column would be something like “abc.xml”. But how to get this in the orchestration as the (FILE.ReceivedFileName) property procures the entire name viz. “C:\Abc\Def\abc.xml”? So, it requires that the entire name be used in the database, which is not to be in my case as the entry is like “abc.xml”.

       

    • #25790

      Hi Abhishek.

       

         Didn’t you post something similar in an earlier thread on this forum? Anyway, you can do something like the following code in an Expression shape:

      MyVariable = mIncomingMessage(FILE.ReceivedFileName);

      MyVariable = MyVariable.Substring(MyVariable.LastIndexOf(@”\”) + 1);

         MyVariable is an orchestration variable of type System.String, and mIncomingMessage is the message type of the schema associated with the incoming message that triggers your orchestration.

       

         Hope this helps,

       

         Daniel.

       

      • #25802

        Hi xman71,

        I had, indeed, posted a similar message in an earlier thread. But, you see that my inputs were not accurate owing to which, there was a communication barrier in that i wasn’t getting proper answers.

        Anyway, thank you very much for the suggestion/s. They really help.

        • #25804

          Hi I tried the above approach, but I am still unable to achieve it.

           

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.