title: Apache camel - simple scan directory and ftp upload
body: <p>I am trying to use Apache camel to do a simple listen of a directory and upload the files via ftp onto an external location.  I am new this.</p>
  
  <p>I can move my files from one directory to another with this script.  So figured I am half way there. I am now struggling to move it from one directory to the ftp server directory.  I have tested the ftp connection with an ftp client and it all works ok.  </p>
  
  <p>When I run it it moves the file into a directory called ".camel" but does not upload it?  Its not outputting any error?  I am not sure output or view the logs to the terminal so I can view what went wrong?  Do I need to include some kind of .process()?</p>
  
  <p><strong>Main.class</strong></p>
  
  <pre><code>public class Main {
  
      public static void main(String[] args) throws Exception{
  
          CamelContext camelContext = new DefaultCamelContext();
          camelContext.addRoutes(new MoveFileRoute());
          camelContext.start();
          Thread.sleep(10000);
          camelContext.stop();
      }
  
  }
  </code></pre>
  
  <p><strong>MoveFileToRoute</strong></p>
  
  <pre><code>public class MoveFileRoute extends RouteBuilder {
  
      @Override
      public void configure() throws Exception{
  
          from("file://C:\\test")
            .choice()
            .when(simple("${in.header.CamelFileName} contains '*.xlsx'"))
            .to("ftp://rob@10.171.16.100/home/rob/test/?password=rob")
            .otherwise()
            .to("log://org.apache.camel.howto?showAll=true&amp;level=DEBUG");
      }
  
  
  }
  </code></pre>