You could dynamically create a FILE (or FTP) receive location in an orchestration that is activated by the WCF Receive Port.
Brian Loesgen blogged a simple example of code that could be called by your orchestration to create receive locations. If the server and folder names do not change from one call to the next, then you could use the same receive location each time and just activate/deactivate it at run-time.
Here is another Stack Overflow question that specifically addresses activating a receive location in code: Is there a way to automate turning a BizTalk Receive Location on or off through code?
Create a new class project in Visual Studio, add in a reference to Microsoft.BizTalk.ExplorerOM, write a few lines of code, and you've got your helper assembly!
Here's a sample from MSDN to create and configure an HTTP receive location:
private void CreateAndConfigureReceiveLocation()
{
BtsCatalogExplorer root = new BtsCatalogExplorer();
try
{
root.ConnectionString = "Server=.;Initial Catalog=BizTalkMgmtDb;Integrated Security=SSPI;";
//First, create a new one way receive port.
ReceivePort myreceivePort = root.AddNewReceivePort(false);
//Note that if you dont set the name property for the receieve port,
//it will create a new receive location and add it to the receive //port.
myreceivePort.Name = "My Receive Port";
//Create a new receive location and add it to the receive port
ReceiveLocation myreceiveLocation = myreceivePort.AddNewReceiveLocation();
foreach(ReceiveHandler handler in root.ReceiveHandlers)
{
if(handler.TransportType.Name == "HTTP")
{
myreceiveLocation.ReceiveHandler = handler;
break;
}
}
//Associate a transport protocol and URI with the receive location.
foreach (ProtocolType protocol in root.ProtocolTypes)
{
if(protocol.Name == "HTTP")
{
myreceiveLocation.TransportType = protocol;
break;
}
}
myreceiveLocation.Address = "/home";
//Assign the first receive pipeline found to process the message.
foreach(Pipeline pipeline in root.Pipelines)
{
if(pipeline.Type == PipelineType.Receive)
{
myreceiveLocation.ReceivePipeline = pipeline;
break;
}
}
//Enable the receive location.
myreceiveLocation.Enable = true;
myreceiveLocation.FragmentMessages = Fragmentation.Yes;//optional property
myreceiveLocation.ServiceWindowEnabled = false; //optional property
//Try to commit the changes made so far. If the commit fails,
//roll-back all changes.
root.SaveChanges();
}
catch(Exception e)
{
root.DiscardChanges();
throw e;
}
}