Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C392F179B3 for ; Fri, 17 Apr 2015 15:03:24 +0000 (UTC) Received: (qmail 16542 invoked by uid 500); 17 Apr 2015 15:03:20 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 16484 invoked by uid 500); 17 Apr 2015 15:03:20 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Delivered-To: moderator for users@camel.apache.org Received: (qmail 11516 invoked by uid 99); 17 Apr 2015 15:02:06 -0000 X-ASF-Spam-Status: No, hits=1.3 required=5.0 tests=URI_HEX X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: local policy) Date: Fri, 17 Apr 2015 08:01:17 -0700 (MST) From: erik_romson To: users@camel.apache.org Message-ID: <1429282877570-5765969.post@n5.nabble.com> Subject: read file, read content and then read another file or exit MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi I'm new to camel and can't understand how to solve the following. There is a ftp server that generates data each day. It places one or more files in a folder day 1: file0.xml (has seqnr 0) day2: file0.xml (has seqnr 2) file-1.xml (has seqnr 1) file-2.xml (has seqnr 0, same as file0.xml from day 0) etc 1: i have a sequence number n 2: each day, I'll read a file called file0.xml and read a sequence number in it (just a string) 3: if this day's sequence number (m) is m > n+1, I have to read a file called file-1.xml 4: reapeat 3 until m=n+1 basically: I'm a bit stuck with this recursiveness of this. Any solution to this would be very welcome /sear -- View this message in context: http://camel.465427.n5.nabble.com/read-file-read-content-and-then-read-another-file-or-exit-tp5765969.html Sent from the Camel - Users mailing list archive at Nabble.com.