"Dynamic Send Port file" and "create folder" are not friend

Home Page Forums BizTalk 2004 – BizTalk 2010 "Dynamic Send Port file" and "create folder" are not friend

Viewing 0 reply threads
  • Author
    Posts
    • #21691

      Hello everybody,

       

      For my job I must create a send port file which create a folder (one per day) and put files into it.

      I’ve tricked the creation folder with .NET instruction in c# stocked in external library :

       

      [code]

              public static void CreateFolder(string activeDir, String SubDir)
              {
                  //Create a new subfolder under the current active folder
                  string newPath = System.IO.Path.Combine(activeDir, SubDir);

                  // Create the subfolder
                  System.IO.Directory.CreateDirectory(newPath);
                  [/code]

      For sending the file in the right folder I put a message assignement shape with these instructions :

      [code]

      Message_2 = Message_1;
      vDatetime = System.DateTime.Now.ToString(“yyyyMMdd-hhmmss”);
      External_Framework.CreateFolder(@”C:\Alten\test\testdynamicFolder\Out”,vDatetime);
      Message_2(FILE.ReceivedFileName)=”name.xml”;
      Port_2(Microsoft.XLANGs.BaseTypes.Address) = “file://C:\\”+vDatetime;

      [/code]

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