title: Read a datestamped file from an FTP server everyday using Camel
body: <p>I am trying to read a date stamped file from an FTP server each day, at say 16:15.  In an attempt to understand how to do this I am trying to connect to an FTP server, once a minute and incementing the file number each time.</p>
  
  <p>The code that I have so far written is:</p>
  
  <pre><code>private String readFtp = "quartz2://exchange/readFtp?cron=";
  private String cronExpression = "1 * * * * ?";
  
  private int i=0;
  
  @Override
  public void configure() throws Exception {
      from(readFtp+cronExpression).process(new Processor() {
          @Override
          public void process(Exchange exchange) throws Exception {
  
              System.out.println("Triggered the process");
  
              from(getFtpServerUrl())
                      .bean(RateServiceImpl.class, "update")
                      .log("Downloaded file ${file:name} complete.");
          }
      });
  }
  
  private String getFtpServerUrl() {
  
      i++;
      System.out.println("Here with i=" + i);
      return String.format("ftp://%s:21/%s?username=%s&amp;password=%s&amp;fileName=%s", ftpServer, ftpPath, ftpUsername, ftpPassword, "rate"+i+".xml");
  }
  </code></pre>
  
  <p>When I run this, it is printing <code>"Triggered the process"</code> once a minute.  It is also calling <code>getFtpServerUrl</code>.</p>
  
  <p>It is not calling <code>RateServiceImpl.update</code>.  It is not logging <code>"Downloaded file ${file:name} complete."</code>.</p>
  
  <ul>
  <li>Am I going about this in the wrong way?</li>
  <li>Is there a simpler way to construct the fileName each minute?</li>
  <li>Why doesn't <code>RateServiceImpl.update</code> get called?</li>
  </ul>