You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Mikael Andersson Wigander <mi...@pm.me.INVALID> on 2020/09/28 07:35:05 UTC

File component moveFailed with date is not parsed correctly

Hi

trying to use the file component and the moveFailed option to create a directory with a timestamp and put the file there but the date string is not parsed correctly.

This is the yaml string

file://mifir/input/import?noop=false&recursive=true&moveFailed=error/${date:now:yyyyMMdd}/${file:name}&maxDepth=3&readLock=changed

but the directory that is created is
error/now:yyyyMMdd/name/<my file is here>

Using Camel 2.25.2 on MacOS

/M

Re: File component moveFailed with date is not parsed correctly

Posted by Mikael Andersson Wigander <mi...@pm.me.INVALID>.
Thx I'll try
Funny though it has been in docs since 2.2

https://people.apache.org/~dkulp/camel/file-language.html


/M

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday 28 September 2020 kl. 20:59, Claus Ibsen <cl...@gmail.com> wrote:

> Try with $simple{ xxx } as workaround.
> Also try with newer Camel version.
>
> I would assume the date:now function is in 2.25.x also.
>
> On Mon, Sep 28, 2020 at 9:35 AM Mikael Andersson Wigander
> mikael.andersson.wigander@pm.me.invalid wrote:
>
> > Hi
> > trying to use the file component and the moveFailed option to create a directory with a timestamp and put the file there but the date string is not parsed correctly.
> > This is the yaml string
> > file://mifir/input/import?noop=false&recursive=true&moveFailed=error/${date:now:yyyyMMdd}/${file:name}&maxDepth=3&readLock=changed
> > but the directory that is created is
> > error/now:yyyyMMdd/name/<my file is here>
> > Using Camel 2.25.2 on MacOS
> > /M
>
> --
>
> Claus Ibsen
>
> ------------
>
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2



Re: File component moveFailed with date is not parsed correctly

Posted by Claus Ibsen <cl...@gmail.com>.
Try with $simple{ xxx } as workaround.
Also try with newer Camel version.

I would assume the date:now function is in 2.25.x also.

On Mon, Sep 28, 2020 at 9:35 AM Mikael Andersson Wigander
<mi...@pm.me.invalid> wrote:
>
> Hi
>
> trying to use the file component and the moveFailed option to create a directory with a timestamp and put the file there but the date string is not parsed correctly.
>
> This is the yaml string
>
> file://mifir/input/import?noop=false&recursive=true&moveFailed=error/${date:now:yyyyMMdd}/${file:name}&maxDepth=3&readLock=changed
>
> but the directory that is created is
> error/now:yyyyMMdd/name/<my file is here>
>
> Using Camel 2.25.2 on MacOS
>
> /M



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2