Using File.ReceivedFilename

Home Page Forums BizTalk 2004 – BizTalk 2010 Using File.ReceivedFilename

Viewing 1 reply thread
  • Author
    • #12877

      Can I get only the filename with the extension without the absolute path using File.ReceivedFilename?



      I need only xyz.xml in the orchestration.

      Is it possible ?

    • #12878

      thanks !!

      • #12879

        You can always get the full file name and do some string manipulation either inside the Pipeline or Orchestration.

        I think I do something like in this sample:

        Best of luck.

        • #12880

          I don’t think it’s possible, but the System.IO.Path class can help you.

          See this help topic in Visual Studio:


          Here’s the C# code which should work with slight modifications in an Expression shape (exept for the Console.WriteLine and define the variables in Orch View)

          string myfilename = @\”C:\\dir\\subdir\\file1.xml\”;
          string fileonly = System.IO.Path.GetFileName(myfilename);
          Console.WriteLine (\”Output: File=\” + fileonly);

          Output: File=file1.xml

          Neal Walters
 – Self-Training Videos

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