I finally had time to try this. The result was not what I expected though.
My route looks like this:
from("file://C:/applications/data?fileName=${date:now:MMdd}/dataFile.csv")
.log("New file received");
and the result was:
Route: route4 started and consuming from:
Endpoint
Thanks Claus. Yes the file name will always be the same (eg:
inputFile.csv). Only the directory name is dynamic. I will give it a go
tomorrow at work. Thanks for you help.
On Mon, Aug 10, 2015 at 7:46 PM, Claus Ibsen-2 [via Camel] <
ml-node+s465427n5770522...@n5.nabble.com> wrote:
> Hi
>
> Yeah
Hi
Yeah you can filter by fileName actually. Though this would require
the file to be named inputFile.csv
On Mon, Aug 10, 2015 at 10:45 AM, hayden74 wrote:
> So basically change the route to:
>
> from("smb://networkDriveOne/"?noop=true&fileName=${date:now:ddMM}/inputFile.csv&recursive=true")
So basically change the route to:
from("smb://networkDriveOne/"?noop=true&fileName=${date:now:ddMM}/inputFile.csv&recursive=true")
.to("smb://networkDriveTwo?fileExist=Override")
--
View this message in context:
http://camel.465427.n5.nabble.com/smb-endpoint-modified-files-not-copie
No you cannot do dynamic inputs. However you can input from the root
folder where those dirs are, and use the filter option to filter to
only include the directory of todays date. Then you need to use the
recursive=true option. And you can use maxDeep to limit going down too
far.
For the filer opt
Many thanks Claus. I've tried to simply the scenario and ended up asking the
wrong question. My bad.
The input directory in my scenario changes daily based on the date. So the
route looks like this:
string todaysDateStr = "01-01-2015"; //this value changes based on the
current date
from("smb://
That is expected, noop=true means do not copy the file ever again. You
need to use an idempotent repository where you store the key with the
file name and timestamp so the repo can know if its the same file or a
changed file.
btw its often much better to either delete or move the files after you
h