title: Dynamic Apache Camel Output Route
body: <p>Hi i want to compute a dynamic output route using apache Camel. I receive a bunch of files in a folder location, based on its contents i want to move the file to dynamic output folder. The name of the ouput folder will be constructed based on the input content of the file. How do i acheive it. </p>
  
  <p>The Following piece of code read the files, processes them, but i am not sure how to set the value of ${foldername} based on the contents of the file</p>
  
  <pre><code>   from("file:D:\\camel\\input\\one?recursive=true&amp;delete=true")
              .process(new LogProcessor())
              .to("file:D:\\camel\\output\\${foldername}")
  </code></pre>
  
  <p>Please assist</p>