The error description explains the solution: "Use the fileName option to set the dynamic expression."
Use fileName option for the dynamic part like this: <to uri=file:/d:/STATIC/PART/?fileName=${date:now:yyyy}/${date:now:MM}/${date:now:dd}/somthing.txt /> Andrea. On Thu, Jan 10, 2013 at 1:30 PM, tamil13 <tamilvanan...@gmail.com> wrote: > > Hi. I want to create dynamic folder in dd-mm-yyyy based on some condition. > how can we do? > Below is the sample code. > <choice> > <when> > <simple>${file:onlyname.noext} > contains ${properties:fileName1} > </simple> > <to > uri="file:target/${date:now:yyyyMMdd}" /> > </when> > <when> > <simple>${file:onlyname.noext} > contains ${properties:fileName2} > </simple> > <to > uri="file:target/${date:now:yyyyMMdd}" /> > </when> > . > . > > </choice> > > but it shows error ${ } placeholders is not allowed. Use the fileName > option > to set the dynamic expression. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Creating-dynamic-folder-tp5725259.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- "In a world without walls and fences who needs Windows and Gates?"