0

I need to write a route which scans for files starts with batch and moves to destination directory.

from(file:source?delay=2000&antInclude=batch*&readLock=changed).to(file:destination);

After starting route, I have created a files in source directory with following names batchFile28845810.txt, batchFile.signed, batchFile.enc and found file is not moved to destination directory

rocky
  • 753
  • 2
  • 10
  • 26
  • And if you remove `antInclude` then Camel will pickup these files? Are those files in sub folders, if so then you should use `**/batch*` – Claus Ibsen Dec 16 '18 at 10:22
  • yes after removing antInclude..camel is picking up the files. they are not in sub folders ..they are in samefolder as source directory – rocky Dec 16 '18 at 10:25

1 Answers1

0

Have you looked at the filenames of the source directory on a command line? Are there perhaps any invisible characters at the beginning?

You can also try to use this antInclude pattern to ignore any strange stuff at the beginning of the filename.

*batch*
burki
  • 6,741
  • 1
  • 15
  • 31