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]